To remove a LUN and all associated PowerPath and Linux devices from the host environment follow these steps. These steps must be run with root privileges. (Note that it is critical to follow the procedures in exact order because deviating from the procedures can cause the host to panic.) These steps were put together using steps from QLogic KB articles.
1. Stop any I/O to the device being removed. [Unmount the filesystem or make sure that the disk has been completely removed from within Oracle ASM control.] It is critical to stop all I/O on the device that is being removed.
2. Run the following command to determine which native SCSI devices are mapped to the pseudo device:
powermt display dev=all
Find the name of the LUN to be removed and match it up with the emcpower device name. This will need to be done on each server individually.
3. Run the command:
powermt remove dev=emcpower
Where corresponds to the LUN to be removed.
4. Run the command:
powermt release
Failing to run this command results in the pseudo device still being visible in /dev and /sys/block and may lead to some complications when the new devices are dynamically added.
5. In the /tmp/ql_utils directory, there should be a script to rescan the qlogic hbas. (If this script doesn't exist, see the previous post for the steps to get the script.) The script is called ql-dynamic-tgt-lun-disc.sh. Run the script:
/tmp/ql_utils/ql-dynamic-tgt-lun-disc.sh
6. You will now remove the device from the storage array using your array admin utilities. On the Linux server, run powermt display to verify that the device has been removed.
7. Now remove the LUN from the Storage Group (CLARiiON) or unmap it from the FA ports (DMX).
2. Run the following command to determine which native SCSI devices are mapped to the pseudo device:
powermt display dev=all
Find the name of the LUN to be removed and match it up with the emcpower device name. This will need to be done on each server individually.
3. Run the command:
powermt remove dev=emcpower
Where
4. Run the command:
powermt release
Failing to run this command results in the pseudo device still being visible in /dev and /sys/block and may lead to some complications when the new devices are dynamically added.
5. In the /tmp/ql_utils directory, there should be a script to rescan the qlogic hbas. (If this script doesn't exist, see the previous post for the steps to get the script.) The script is called ql-dynamic-tgt-lun-disc.sh. Run the script:
/tmp/ql_utils/ql-dynamic-tgt-lun-disc.sh
6. You will now remove the device from the storage array using your array admin utilities. On the Linux server, run powermt display to verify that the device has been removed.
7. Now remove the LUN from the Storage Group (CLARiiON) or unmap it from the FA ports (DMX).