Re: rescan scsi

Richard B. Johnson (root@analogic.com)
Fri, 20 Jun 1997 11:04:35 -0400 (EDT)


On Fri, 20 Jun 1997, Lauri Tischler wrote:

> If I plug a new diskdrive into a scsicontroller on a live system, how
> do I get the drive to be identified (as /dev/sdx or such) without
> rebooting the bloody box ?

If this is not a joke you should get 40 lashes from a wet noodle. You
do not connect or disconnect anything from a SCSI bus when power is on
even if you "prove" that it can be done.

Nevertheless, it is possible. There is no existing kernel code to support
this. You CAN swap drives that are identical by dismounting the existing
one, removing it, hooking up the other, then remounting (after fsck).
Basically you are tricking the kernel into thinking it's the same drive.

I use this trick on my Suns. When I boot a Sun, I hook up an external
tape drive. Once it is "up", I disconnect the drive (I only have 1 to share
over a bunch of Suns).

If I have to use the tape drive on a Sun, I reconnect it. It will work
because the Sun "saw" it during initialization.

Cheers,
DJ
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Analogic Corporation
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.42 on an i586 machine (66.15 BogoMips).
Warning : It's hard to stay on the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-