StorageSystem

Rescan SCSI to add, remove SCSI device without rebooting

To rescan an entire SCSI bus and re-register all devices found: Rescan SCSI so the system recognizes a new SCSI device. On some Linux systems, a SCSI rescan also adds or removes devices. For Fibre storage, use:

echo “1” > /sys/class/fc_host/host#/issue_lip

For ordinary storage, use the following command. The command above also works, but may take longer to rescan.

echo ”- - -” > /sys/class/scsi_host/host#/scan

is the SCSI bus number.

To remove a SCSI device:

echo 1 > /sys/block//device/delete

or

echo “scsi remove-single-device ” > /proc/scsi/scsi

To add a SCSI device:

echo “scsi add-single-device ” > /proc/scsi/scsi

tip Find the relevant values in /sys (2.6 kernels), /proc/scsi/scsi, or dmesg.

EOF.← Back to articles