How to force Redhat Linux operating system to recognize Disks that are added or removed from the Fabric. .
There are several methods that you can use to force the Linux operating system to recognize disks that are added or removed from the fabric.
These are the two most common techniques: [Applies to both FC/iSCSI LUN]
1. Rescan the SAN by restarting the host
Result: A bus rescan is automatically performed when restarting the system. However, this option may not be practical or allowed to do.
2. Rescan the SAN by echoing the /sys filesystem
For Linux 2.6 kernels, a rescan can be triggered through the /sys interface without having to unload the host adapter driver or restart the system.
The following command format scans all channels, targets, and LUNs on host H.
echo “- - -” > /sys/class/scsi_host/host#/scan
Use the following command shown in the figure below to obtain the host# , this example is for the iSCSI LUN.
Once the host# is identified, run this command.
echo "- - -" > /sys/class/scsi_host/host3/scan
This should attach the LUN to SCSI Sd-disk.
Please Note: I could do - iSCSI --rescan, but it is more practical to perform manual specific scan using 'echo', rather than doing iSCSI --rescan, b'cos a single target may have multiple logical units and/or portals.
In case of FC [LUN] HBAs, use 'fc_host' to determine FC HBAs first:
# ls /sys/class/fc_host
host0 host1
In this case, you need to scan host0 & host1 HBA using the same command as mentioned above.
# echo “- – -” > /sys/class/scsi_host/host0/scan
# echo “- – -” > /sys/class/scsi_host/host1/scan
There are several methods that you can use to force the Linux operating system to recognize disks that are added or removed from the fabric.
These are the two most common techniques: [Applies to both FC/iSCSI LUN]
1. Rescan the SAN by restarting the host
Result: A bus rescan is automatically performed when restarting the system. However, this option may not be practical or allowed to do.
2. Rescan the SAN by echoing the /sys filesystem
For Linux 2.6 kernels, a rescan can be triggered through the /sys interface without having to unload the host adapter driver or restart the system.
The following command format scans all channels, targets, and LUNs on host H.
echo “- - -” > /sys/class/scsi_host/host#/scan
Use the following command shown in the figure below to obtain the host# , this example is for the iSCSI LUN.
Once the host# is identified, run this command.
echo "- - -" > /sys/class/scsi_host/host3/scan
This should attach the LUN to SCSI Sd-disk.
Please Note: I could do - iSCSI --rescan, but it is more practical to perform manual specific scan using 'echo', rather than doing iSCSI --rescan, b'cos a single target may have multiple logical units and/or portals.
In case of FC [LUN] HBAs, use 'fc_host' to determine FC HBAs first:
# ls /sys/class/fc_host
host0 host1
In this case, you need to scan host0 & host1 HBA using the same command as mentioned above.
# echo “- – -” > /sys/class/scsi_host/host1/scan
No comments:
Post a Comment