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:
[[code]]czo1ODpcInNoZWxsJmd0OyBlY2hvIFwiMVwiICZndDsgL3N5cy9jbGFzcy9mY19ob3N0L2hvc3QjL2lzc3VlX2xpcFwiO3tbJiomXX0=[[/code]]
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:
[[code]]czo1OTpcInNoZWxsJmd0OyBlY2hvIFwiLSAtIC1cIiAmZ3Q7IC9zeXMvY2xhc3Mvc2NzaV9ob3N0L2hvc3QjL3NjYW5cIjt7WyYqJl19[[/code]]
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
[[code]]czo1ODpcInNoZWxsJmd0OyBlY2hvIDEgJmd0OyAvc3lzL2Jsb2NrLyZsdDtkZXYmZ3Q7L2RldmljZS9kZWxldGVcIjt7WyYqJl19[[/code]]
Red Hat Enterprise Linux 3 or 4:
To add a single device explicitly:
[[code]]czoxMDA6XCJzaGVsbCZndDsgZWNobyBcInNjc2kgYWRkLXNpbmdsZS1kZXZpY2UgJmx0O0gmZ3Q7ICZsdDtCJmd0OyAmbHQ7VCZndDsge1smKiZdfSZsdDtMJmd0O1wiICZndDsgL3Byb2Mvc2NzaS9zY3NpXCI7e1smKiZdfQ==[[/code]]
To remove a device explicitly:
[[code]]czoxMDM6XCJzaGVsbCZndDsgZWNobyBcInNjc2kgcmVtb3ZlLXNpbmdsZS1kZXZpY2UgJmx0O0gmZ3Q7ICZsdDtCJmd0OyAmbHQ7VCZne1smKiZdfXQ7ICZsdDtMJmd0O1wiICZndDsgL3Byb2Mvc2NzaS9zY3NpXCI7e1smKiZdfQ==[[/code]]
Where <H> <B> <T> <L> 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.