Re: re-detect SCSi bus?

Robert L Harris (nomad@rocky.orci.com)
Wed, 18 Mar 1998 09:41:44 -0700


On Wed, Mar 18, 1998 at 08:08:56AM -0800, Brian Macy wrote:
> >Windows95 does this "rescan" by looking at the installed devices and
> >rechecking for their presence. If such as list were kept in Linux - at
> >least for SCSI, then I suspect the "rescan" could be accomplished.
> >
> >I am making a lot of assumptions here - but I think it is important to
> >visit this issue. SCSI is used far more extensively in Linux then Win95.
> >It also is becoming more of a plug and play bus - with auto termination,
> >auto ID, and the new single connector (power and data) connections.
> >
> >Shouldn't this be done in a common SCSI module (non card specific) ?
>
>
> I agree... I use the rescan feature in Win95 to detect my SCSI scanner. The
> life on the bulb isn't that long so I don't want to leave it on all the
> time. I'd also like to hot swap drives into a SCSI tower and unloading the
> SCSI module is just not an option. If anyone knows where to grab docs on
> doing a rescan (even a hacked one) I'd appreciate it (I'm hoping to get as
> much off my Windows boxes as possible... especially the scanner).
>
> Brian Macy
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu

I don't know about re-scanning the whole bus, but you can add/remove
individual devices, which is what started this thread. You can add a device
to the system with:

echo "scsi add-single-device 1 0 2 0" > /proc/scsi/scsi

In this case I'm adding a device to scsi devise 1 (my second scsi controller,
since my first controller is 0) on channel 0 (A) at ID 2 and LUN 0. This
let's me use my scanner without rebooting. I can turn it on, run this
line and then it's scanning time. using "remove-single-device" works
just as well (don't power the device off until it's removed) but I don't
know about hot-swapping HD's...

PS: THANKS to whomever on this lost showed me this trick... NOTE I did
remember the /proc/scsi before the scsi... :>

Robert

-- 

--------------------------------------------------------------------------- Robert L. Harris | NT is secure.... System Engineer For Hire. \_ as long as you don't remove the shrink wrap.

http://www.orci.com/~nomad

DISCLAIMER: These are MY OPINIONS ALONE. I speak for no-one else. perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu