Rescan the SCSI bus w/out rebooting

Just in case the article dissapears (it happens). This is a edited version of the following.
“How do I rescan the SCSI bus to add or remove a SCSI device without rebooting the computer?”

To add or remove a SCSI device explicitly, or to re-scan an entire SCSI bus without rebooting a running system:

Red Hat Enterprise Linux 4 or 5:

To rescan an entire SCSI bus and re-register all devices found:

When dealing with fibre attached storage, it is necessary to issue a LIP (loop initialization primitive) on the fabric:

Replace the “#” with the number of the SCSI bus to be rescanned.

Note: Issueing a LIP (above) on Red Hat Enterprise Linux 5 is all that is needed to rescan fibre
attached storage. Once the LIP is issued, the bus scan may take a few seconds to complete.

To rescan all other SCSI attached storage, a rescan should be issued:

Replace the “#” with the number of the SCSI bus to be rescanned.

In addition to re-scanning the entire bus, a specific device can be added or deleted for some versions or Red Hat Enterprise Linux as specified below.

Red Hat Enterprise Linux 4 or 5:

To remove a single existing device explicitly

Red Hat Enterprise Linux 3 or 4:

To add a single device explicitly:

To remove a device explicitly:

Where are the host, bus, target, and LUN numbers for the device,as reported in /sys (2.6 kernels only) or /proc/scsi/scsi or dmesg. These numbers are sometimes refered to as “Host”, “Channel”, “Id”, and “Lun” in Linux tool output and documentation.

Bookmark the permalink.

Leave a Reply