Removing LUNs dynamically from an existing target ID

Dynamic Multi-Pathing (DMP) provides a Dynamic Reconfiguration tool to simplify the removal of LUNs from an existing target ID. Each LUN is unmapped from the host. DMP issues an operating system device scan and cleans up the operating system device tree.

Warning:

Do not run any device discovery operations outside of the Dynamic Reconfiguration tool until the device operation is completed.

In a cluster, perform the steps on all nodes in the cluster.

To remove LUNs dynamically from an existing target ID

  1. Stop all applications and volumes that are hosted on the LUNs that are to be removed.

    If the device is in use by Veritas Volume Manager (VxVM), perform the following steps:

    • If the device is part of a disk group, move the disk out of the disk group.

      # vxdg -g dgname rmdisk daname

      See Removing a disk from a disk group.

    • Remove the disk from the vxdisk list.

      In a cluster, perform this step from all of the nodes.

      # vxdisk rm da-name

      For example:

      # vxdisk rm eva4k6k0_0

    For LUNs using Linux LVM over DMP devices, remove the device from the LVM volume group.

    # vgreduce vgname devicepath
  2. Start the vxdiskadm utility:
    # vxdiskadm
  3. Select the Dynamic Reconfiguration operations option from the vxdiskadm menu.
  4. Select the Remove LUNs option.
  5. Type list or press Return to display a list of LUNs that are available for removal. A LUN is available for removal if it is not in use.

    The following shows an example output:

    Select disk devices to remove: [<pattern-list>,all,list]: list
    LUN(s) available for removal:
    eva4k6k0_0
    eva4k6k0_1
    eva4k6k0_2
    eva4k6k0_3
    eva4k6k0_4
    emc0_017e
  6. Enter the name of a LUN, a comma-separated list of LUNs, or a regular expression to specify the LUNs to remove.

    For example, enter emc0_017e.

  7. At the prompt, confirm the LUN selection.

    DMP removes the LUN from VxVM usage.

  8. At the following prompt, remove the LUN from the array/target.
    Enclosure=emc0 AVID=017E
       Device=emc0_017e Serial=830017E000
    ----------------------------------------------------------
         PATH=sda ctlr=c15 port=7e-a [50:01:43:80:12:08:3c:26]
         PATH=sdc ctlr=c17 port=7e-a [50:01:43:80:12:08:3a:76]
    ----------------------------------------------------------
    Please remove LUNs with above details from array and 
    press 'y' to continue removal (default:y):
  9. Return to the Dynamic Reconfiguration tool and select y to continue the removal process.

    DMP completes the removal of the device from VxVM usage. Output similar to the following displays:

    Luns Removed
    -------------------------
    emc0_017e

    DMP updates the operating system device tree and the VxVM device tree.

  10. Select exit to exit the Dynamic Reconfiguration tool.