In this case, a group of LUNs is unmapped from the host HBA ports and an operating system device scan is issued. The device scan recognizes the LUNs and adds them to DMP control. To add subsequent LUNs seamlessly, perform additional steps to cleanup the operating system device tree.
The high-level procedure and the VxVm commands are generic. However, the operating system commands may vary depending on the Linux version. For example, the following procedure uses Linux Suse10.
To remove LUNs dynamically from an existing target ID
Identify which LUNs to remove from the host. Do one of the following:
Remove the LUNs from the disk group. Do one of the following:
If the data has been evacuated, enter the following command:
# vxdg -g diskgroup rmdisk da-name
If the data has not been evacuated and the LUN is part of a subdisk or diskgroup, enter the following command. If the disk is part of a shared disk group, you must use the -k option to force the removal.
# vxdg -g diskgroup -k rmdisk da-name
Using the AVID or LUN index, use Storage Array Management to unmap or unmask the LUNs you identified in step 1.
Remove the LUNs from the vdisk list. Enter the following command on all nodes in a cluster:
# vxdisk rm da-name
This is a required step. If you do not perform this step, the DMP device tree shows ghost paths.
Clean up the Linux SCSI device tree for the devices that you removed in step 5.
This step is required. You must cleanup the operating system SCSI device tree to release the SCSI target ID for reuse if a new LUN is added to the host later.
Use Volume Manager to perform a device scan. You must perform this operation on all nodes in a cluster. Enter one of the following commands:
Verify that the LUNs were removed cleanly by answering the following questions:
Verify that the operating system metanodes are removed from the /sys/block directory.
Were all the appropriate LUNs removed?
Use the DMP disk reporting tools such as the vxdisk list command output to determine if the LUNs have been cleaned up successfully.
Is the vxdisk list output correct?
Verify that the vxdisk list output shows the correct number of paths and does not include any ghost disks.
If the answer to any of these questions is "No," return to step 4 and perform the required steps.
If the answer to all of the questions is "Yes," the LUN remove operation is successful.