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.
About this task
To modify an LU mapping, complete the following steps:
Procedure
- Migrate all of the data from the managed disk (MDisk):
- 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. The MDisk number is
the number of the MDisk that you want to modify and storage pool number is the
number of the storage pool for which you want to remove the MDisk.
rmmdisk -mdisk MDisk number -force storage pool numberNote:- 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.
- 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.
- Enter the following CLI command to remove the host mapping and any SCSI reservation that the
host has on the volume. The host name is the name of the host
for which you want to remove the volume mapping, and virtual disk
name is the name of the volume for which you want to remove
mapping.
rmvdiskhostmap -host host name virtual disk nameNote: 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. - 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
- 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. The MDisk number is
the number of the MDisk that you want to modify and storage pool number is the
number of the storage pool for which you want to remove the MDisk.
- Remove the LU mapping on the storage system so that the LUN is not visible to the system.
- Important:Enter the following CLI command to clear all error counters on the MDisk, where MDisk number is the number of the MDisk that was removed.
includemdisk MDisk number - Enter the following CLI command to rescan the Fibre
Channel network and detect that the LU is no longer there.
The MDisk is no longer visible on the system.detectmdisk - 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 - Configure the mapping of the LU to the new LUN on the storage system.
- Enter the following CLI command:
detectmdisk - Enter the following CLI command to check that the MDisk now has the correct LUN:
lsmdisk
Results
The MDisk has the correct LUN.
Parent topic: Configuring and servicing storage systems