Scanning for new LUNs
echo 1 > /sys/class/fc_host/host0/issue_lip
echo 1 > /sys/class/fc_host/host1/issue_lip
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scanFrom RHEL5.4, RedHat has provided a script to scan all the SCSI buses
/usr/bin/rescan-scsi-bus.sh
Removing a path or LUN from the kernel device tree
echo 1 > /sys/block/sdX/device/delete
Take a path offline
echo offline > /sys/block/sda/device/state
If the LUN size is changed at the storage level, the following will rescan the LUN
and update the kernel with the new sizeecho 1 > /sys/block/sdX/device/rescan
Wednesday, 23 March 2011
How to dynamically scan/add/remove/offline LUNs in Linux running 2.6 kernel
Labels:
Linux
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment