This will scan the scsi host and no need to reboot to make devices(luns) visible.
echo “- – -” > /sys/class/scsi_host/host#/scan
Verify
fdisk -l
tail -f /var/log/message
Replace host# with actual value such as host0. You can find scsi_host value using the following command
# ls /sys/class/scsi_host
Now type the following to send a rescan request:
echo “- – -” > /sys/class/scsi_host/host0/scan
Can devices be rescanned in Linux OS without reloading the Linux driver?
A new LUN was added to the storage, but the LUN cannot be seen by the driver or the OS. Rebooting or reloading the driver would be too disruptive.
Answer
There is a procedure which forces the driver to rescan the targets to allow a new device to be added. This triggers the driver to initiate a LUN discovery process.
To force a rescan from the command line, type the following command
# echo “scsi-qlascan” > /proc/scsi//
Where:
– = qla2100, qla2200, qla2300 (2.4 kernel drivers) or qla2xxx (2.6 kernel drivers)
– = the instance number of the HBA
After executing this command, force the SCSI mid layer to do its own scan and build the device table entry for the new device by typing the following command
# echo “scsi add-single-device 0 1 2 3? >/proc/scsi/scsi
Where:
– “0 1 2 3? = your “Host Channel ID LUN”
The scanning must be done in the above mentioned order: first the driver (qla2300/qla2200 driver, etc.), and then the Linux SCSI mid layer (i.e. OS scan).
– See more at: http://linoxide.com/how-tos/linux-scan-scsi/#sthash.CUZ4SYF6.dpuf
Recent Comments