Here is the different methods to scan the new Luns / SAN Disks in Qlogic and Emulex.
# /usr/bin/rescan-scsi-bus.sh (or) /sbin/rescan-scsi-bus.sh
rescan-scsi-bus.sh script can automatically update the logical unit configuration of the host as needed (after a device has been added to the system). The rescan-
scsi-bus.sh script can also perform an issue_lip on supported devices.
# lun_scan.sh
Emulex Linux LUN/target scan script enables you to dynamically (without a reboot, driver unload/reload, or HBA reset) discover new targets and LUNs (on new or existing targets) that have come online. This feature is supported via standard Linux mechanisms. The script enables you to automatically discover all new devices.
# ql-scan-lun.sh
This utility scans for the newly added LUNs. After adding the new LUNs it is not required to unload/load the QLogic FC driver or reboot the system. To see the newly added LUNs, just run the ql-scan-lun.sh utility.
By default the utility would re-scan the QLogic HBAs for new LUNs.
Manual Procedure for Qlogic
# echo "scsi-qlascan" > /proc/scsi/qla2300/0
# cat /proc/scsi/qla2300/0
Other Procedure for Emulex
for i in 0 1 2 3 4 5 6
do
echo "1" > /sys/class/fc_host/host$i/issue_lip
echo "- - -" > /sys/class/scsi_host/host$i/scan
done
Note : if scsi_host not exists, use fc_host
you can run fdisk -l or multipath -ll to see the new luns once its visible. also you can use sg_map -sd for disk mapping.