scan for luns
Hello guys,
thanks for helping me with this. If you have your SAN connect to RHEL by fiber channel , how do you scan for luns?
I have worked with iscsi, I can't find any documents from red hat documenting how to scan for luns connected by fiber channel.
Thanks guys
Arrey
Responses
Hi Ashu,
Make the operating system aware of the new storage device, or path to an existing device. The recommended command to use is:
echo "c t l" > /sys/class/scsi_host/hosth/scan
In the previous command, h is the HBA number, c is the channel on the HBA, t is the SCSI target ID, and l is the LUN.
It should look like something like this.
echo "0 2 56" > /sys/class/scsi_host/host5/scan
Refer to this article.
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/adding_storage-device-or-path.html
The advice above is solid.
I generally will install sg3_utils and run rescan-scsi-bus.sh
ls -l /dev/sd* > /var/tmp/sd-0.out
multipath -ll -v2 > /var/tmp/multipath-ll-v2-0.out
yum -y install sg3_utils
rescan-scsi-bus.sh
ls -lart /dev/sd*
ls -lart /dev/mapper
Then to review the differences...
ls -l /dev/sd* > /var/tmp/sd-1.out
multipath -ll -v2 > /var/tmp/multipath-ll-v2-1.out
sdiff /var/tmp/sd-0.out /var/tmp/sd-1.out
sdiff /var/tmp/multipath-ll-v2-0.out /var/tmp/multipath-ll-v2-1.out
Thanks to James, very useful info.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
