Modifying a logical unit mapping by using the CLI

You can modify a logical unit (LU) mapping by using the command-line interface (CLI). The LUN ID and unique identifier (UID) are linked and cannot be changed dynamically when the system is managing the MDisk.

To modify an LU mapping, complete the following steps:

  1. Migrate all of the data from the managed disk (MDisk):
    1. If the MDisk is in managed mode or image mode and the volume must be kept online, enter the following CLI command and then proceed to step 2:
       rmmdisk -mdisk MDisk number -force storage pool number
      Note:
      • The volume becomes a striped MDisk, not an image-mode volume.
      • All data that is stored on this MDisk is migrated to the other MDisks in the storage pool.
      • This CLI command can fail if sufficient free extents are not available in the storage pool.
    2. If the MDisk is in image mode and you do not want to convert the volume to a striped volume, stop all I/O to the image mode volume.
    3. Issue the following CLI command to remove the host mapping and any SCSI reservation that the host has on the volume:
      rmvdiskhostmap -host host name virtual disk name
      Note: If volume protection is enabled and the volume that is being unmapped received I/O within the defined volume protection interval, then the command fails.
    4. Enter the following command to delete the volume, where virtual disk name is the name of the volume that you want to delete.
      rmvdisk virtual disk name
  2. Remove the LU mapping on the storage system so that the LUN is not visible to the system.
  3. Important:
    Issue the following CLI command to clear all error counters on the MDisk:
    includemdisk MDisk number
  4. Enter the following CLI command to rescan the Fibre Channel network and detect that the LU is no longer there.
    detectmdisk 
    The MDisk is no longer visible on the system.
  5. Enter the following CLI command to verify that the MDisk is removed, where MDisk number is the number of the MDisk that was removed.
    lsmdisk MDisk number

    If the MDisk is still displayed, repeat steps 3 and 4.

  6. Configure the mapping of the LU to the new LUN on the storage system.
  7. Enter the following CLI command:
    detectmdisk 
  8. Enter the following CLI command to check that the MDisk now has the correct LUN:
    lsmdisk

The MDisk has the correct LUN.