UCC has an EMC SAN* connected over fibre channel. This page documents a couple of handy commands and other dos/don'ts. For initial setup and config, see SANConfig in wheel docs (and that document should probably be published too, seeing as EMC won't release any setup instructions for their gear).
Scanning for new LUNs
for i in $(ls -1 /sys/class/scsi_host/); do echo '- - -' > /sys/class/scsi_host/$i/scan; done
Removing a LUN from a host
- Ensure the device is unmounted on the host
- Delete the LUN on the SAN (or remove the host access from the LUN if you don't want to delete it)
Use multipath -ll to list the device maps, dm names and path status. The device you're removing should have all paths as "failed", otherwise you're probably looking at the wrong device.
- By default, the failure mode of a device is to queue data if the device becomes unavailable. This prevents the device being removed from multipath because there's usually data in the queue. To delete the device, you first have to set it to fail if there's no path with the following command on the host:
dmsetup message <dm name, eg dm-2> 0 "fail_if_no_path"
Use multipath -ll to check that the mode has changed for the device
- You should then be able to remove the device with
multipath -f <device map, eg 3600601609fe010006cf4f3c6ef4ce21>
* We would like to note that UCC was donated this SAN by a third party and we do not promote the use of EMC equipment. EMC refused to provide even the most basic of instruction manuals unless we purchased a full support agreement. While we appreciate that EMC needs to make a profit, we are disappointed that EMC felt it was necessary to charge a non-profit, student-run club just to allow them to use the product normally.