# Re: rescan-scsi-bus.sh usage

**URL:** <https://forums.suse.com/t/re-rescan-scsi-bus-sh-usage/21817>\
**Category:** SLES Configure-Administer\
**Created:** [September 23, 2011, 4:26am UTC](https://forums.suse.com/t/re-rescan-scsi-bus-sh-usage/21817 "2011-09-23T04:26:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [September 23, 2011, 4:26am UTC](https://forums.suse.com/t/re-rescan-scsi-bus-sh-usage/21817/1 "2011-09-23T04:26:02Z")

</div>

Hi,

Apart from manually calling or running the script mentioned above, does  
SLES automatically scan the PCI and SCSI buses at periodic intervals?  
I’m trying to get an understanding of exactly what happens when device  
disappears and reappears on the system.

I have my node attached by fiber to an EMC SAN (via a QLogic HBA with  
qla2xxx driver). If I pull the fiber cables out, I can see udev entries  
in /var/log/messages, telling me that the devices (sdb, sdc…) have  
been removed. Similarly, if I put the fiber cables back in, I can see  
udev entries in /var/log/messages, telling me that some devices have  
been added. The problem I’m actually having is that they are appearing  
with new (different) device names, so I’m trying to figure out how this  
detection is working at a relatively low level in the kernel.  
Could you please help me to understand exactly what initiates the  
process that informs the kernel that the devices have been  
removed/added?  
Is the PCI or SCSI subsystem periodically scanning for changes on the  
bus? My understanding (which may be incorrect) is that the PCI subsystem  
scans for devices on the bus. When it finds one it will register the new  
device with the device core and a kobject will be created in the kernel.  
Then the list of drivers for the PCI (or SCSI) subsystem will be queried  
until a matching driver for the new device is found. Then the driver  
will initialize the new device and the reference counter in the device’s  
associated kobject will be incremented, at which time a uevent will be  
sent to udev.  
Or, is it the driver that is responsible for detecting these changes  
and informing the device core in the kernel?

I’d eventually like to understand why different names are assigned to  
the devices when the cables are re-attached, but considering the topic  
of this thread, I’d very much like to know what informs the kernel of  
device status changes if the rescan-scsi-bus.sh script is not explicitly  
being run by me.

Thanks and regards,  
KK

## – boy\_named\_suse

boy\_named\_suse’s Profile: [http://forums.novell.com/member.php?userid=117126](http://forums.novell.com/member.php?userid=117126)  
View this thread: [http://forums.novell.com/showthread.php?t=332158](http://forums.novell.com/showthread.php?t=332158)
