LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Re-Scanning a SCSI BUS (https://www.linuxquestions.org/questions/linux-hardware-18/re-scanning-a-scsi-bus-215883/)

Crazy Joe Davol 08-10-2004 02:12 PM

Re-Scanning a SCSI BUS
 
Hey, first time post here.

I was wondering if there was a way / command that will re-scan the SCSI bus.

I am using RH9. I want to find a way to rescan the SCSI bus while the system is up (similar to re-scanning for devices in Device Manager for Windows Machines). The reason is that I am constantly adding and removing SCSI devices/drives from the system, and the only way I know how to re-scan the SCSI bus is to reboot the system. Since the system must be on with little downtime, this is not a good option. Any help would be appreciated.

BTW, I am a beginner when it comes to Linux.

Cheers,

CJD

lunanchow 08-11-2004 12:51 AM

Try the following:

echo "rescan" > /proc/scsi/cciss0/0

where "cciss" is my scsi card and 0 is the card number, check the directory "/proc/scsi" to make sure which one you are using. Hopefully it can help you.

^_^

Crazy Joe Davol 08-11-2004 01:38 PM

Ok, so my SCSI card is an LSI card. I verify the card in /proc/scsi as being sym53c8xx. It is the only card in the system, so it is card 0.

I open up a terminal window, and type the following:

echo "rescan" > /proc/scsi/sym53c8xx/0 ENTER

When I do this, I get no message of anything. I then goto the Hardware Browser to see if it has picked up the SCSI disks I have added. It does not see anything new.

Any ideas?

michaelk 08-11-2004 03:58 PM

This might be what you are looking for, it is not intended for hot swappable devices.
http://scsi-rescan.sourceforge.net/

IMHO unless you have a hot swappable device I do not think it is a good idea to constantly disconnect / reconnect SCSI devices especially if you have disk drives connected to the chain.

Crazy Joe Davol 08-11-2004 04:18 PM

Thanks for the link.

I configure multi-terabyte SCSI/FC RAID Subsystems and it is alot easier to just add a new device and rescan the bus than to reboot. I do all the configuration and testing, then I can unmount the device and disconnect it. Then I can add another RAID Subsystem to my SCSI bus and simply re-scan as opposed to rebooting.

Thankx, I'll try it and see how it works.

drolic 08-15-2004 04:51 AM

Just an FYI if using fibre devices behind a SCSI midlayer driver you may want to edit
any rescan scrips, FC device id's can go above 15 devices, something scsi bus cannot do.

There is a LSI 2772 raid box i use and muliple volumes on multible luns creates a problem, if i dont tell the driver to scan all device id's and luns beond 127.

also rescaning scsi bus can be important because without some kernel mods most will not scan muti-lun devices on boot so the scan must be done after the system comes up, hot adding is suported in linux, use it!

a couple of notes though caution should be used not to remove and re-add the os device. This can be done if your installed on a scsi channel and your rescan that channel. SuSE 9.1 will go off into lala-land (technical term) if this happnes. RedHat seems to be able to handel it, has somethign to do with the /proc system, they changed it in the 2.6 kernel thats all i know.

Also, tapes typicaly dont like to be hot added, duno why but whenever i hotadd a certain SONY multi-lun tape RHEL 3,0 always messes up the blocksize untill i reboot.

Crazy Joe Davol 08-15-2004 12:18 PM

Thnks for the info.

I am aware of the issues when using multi-LUN devices. By default, I believe only LUN0 of the first 15 target devices are scanned. I must edit the scripts to include any LUN's above LUN0, and any devices with a higher ID in order for the os to see it.

At least, I know this is the case with Solaris, and I've experienced similar issues with various linux kernels.


All times are GMT -5. The time now is 03:14 PM.