Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 08-10-2004, 02:12 PM   #1
Crazy Joe Davol
LQ Newbie
Registered: Aug 2004
Posts: 19

Rep: Reputation: 0
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.


Old 08-11-2004, 12:51 AM   #2
LQ Newbie
Registered: May 2004
Location: Hong Kong
Distribution: RedHat 7.3, 8, 9, Mandrake 8, SCO Unix
Posts: 7

Rep: Reputation: 0
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.

Old 08-11-2004, 01:38 PM   #3
Crazy Joe Davol
LQ Newbie
Registered: Aug 2004
Posts: 19

Original Poster
Rep: Reputation: 0
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?
Old 08-11-2004, 03:58 PM   #4
Registered: Aug 2002
Posts: 16,157

Rep: Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875
This might be what you are looking for, it is not intended for hot swappable devices.

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.
Old 08-11-2004, 04:18 PM   #5
Crazy Joe Davol
LQ Newbie
Registered: Aug 2004
Posts: 19

Original Poster
Rep: Reputation: 0
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.
Old 08-15-2004, 04:51 AM   #6
LQ Newbie
Registered: Aug 2004
Posts: 13

Rep: Reputation: 0
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.
Old 08-15-2004, 12:18 PM   #7
Crazy Joe Davol
LQ Newbie
Registered: Aug 2004
Posts: 19

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanning new scsi hardware with RH AS3 consty Linux - Hardware 0 11-16-2005 03:21 PM
scanning for new scsi devices hodgsonjk Linux - Hardware 2 05-13-2005 06:01 PM
Scsi bus re-scan tmoorman Linux - Hardware 2 01-07-2004 10:33 AM
Mandrake 9.1 scanning for SCSI rufius Linux - Hardware 3 08-15-2003 01:44 PM
Help! Reboots when scanning SCSI channel chaines Linux - General 8 06-28-2002 07:47 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration