In this case, a group of LUNs is unmapped from the host HBA ports and an operating system device scan is issued. To add subsequent LUNs seamlessly, perform additional steps to clean up the operating system device tree.
The high-level procedure and the SF commands are generic.
To remove LUNs dynamically from an existing target ID
on
. This setting is the default. # vxdmpadm gettune dmp_cache_open
If the tunable is set to off
, set the dmp_cache_open tunable to on
.
# vxdmpadm settune dmp_cache_open=on
Evacuate the data from the LUNs using the vxevac command.
See the vxevac(1M) online manual page.
After the data has been evacuated, enter the following command to remove the LUNs from the disk group:
# vxdg -g diskgroup rmdisk da-name
If the data has not been evacuated and the LUN is part of a subdisk or disk group, enter the following command to remove the LUNs from the disk group. 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
# reducevg vgname pvname
# vxdisk rm da-name
This is a required step. If you do not perform this step, the DMP device tree shows ghost paths.
This step is required. You must clean up the operating system SCSI device tree to release the SCSI target ID for reuse if a new LUN is added to the host later.
# vxddladm assign names
After the LUN is removed cleanly, there should be no hdisk entries in the "Defined" state.
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 5 and perform the required steps.
If the answer to all of the questions is "Yes," the LUN remove operation is successful.