How Can I Change LUN Mappings When Non-Huawei Multipathing Software Is Used?
Follow the correct procedure when you change the LUN mappings on the storage system, including removing and adding a LUN, modifying the host LUN ID, and changing the port on the storage system.
Environment
Item |
Description |
---|---|
Operating system |
AIX |
Networking mode |
SAN |
Multipathing software |
MPIO/DMP |
Context
When a LUN mapping is removed from the storage system, the AIX host does not delete the disk corresponding to the LUN. When the LUN is mapped to the host again (the change to the mapping sequence may cause the change to the host LUN ID of the LUN), MPIO or Veritas DMP may manage paths incorrectly after the host scans disks, resulting in exceptions in follow-up operations. To prevent this problem, you must follow the correct sequence when changing the LUN mapping.
Procedure
In non-HyperMetro scenarios:
- Stop the services running on the disk for which you want to change the mapping.
If the third-party Veritas DMP multipathing software is used, run the vxdisk rm huawei-xsg1*_# command to delete the disks managed by DMP, and then go to 2.
- Run the rmdev -dl hdiskx command to delete this disk. This operation may change the drive letter of the disk after the mapping is changed. If upper-layer applications on the host depend on the drive letter, record the relationship between the drive letter and WWN before deleting the disk, which helps you reconfigure services or restore the original drive letter after the change.
- Change the LUN mapping on the storage system's DeviceManager.
- Run the cfgmgr command on the host to scan disks.
- Contact the administrator to restart the services.
In HyperMetro scenarios:
To change the mappings on both storage systems, use the same method as the non-HyperMetro scenario. If you only need to change the mapping on one storage system, perform the following steps:
- On the storage system, suspend the services on the LUN for which you want to change the mapping. After all services have been switched to the other storage system, perform step 2.
- Run the lspath -F "name:parent:connection:path_id:status" | grep hdiskx command on the host to query all logical paths of the LUN for which you want to change the mapping.
The following example queries all logical paths of hdisk2.
- Use the rmpath command to delete all logical paths of the involved LUN.
For example, to delete the logical path of hdisk2 whose path_id is 0, run the following command:
- Change the LUN mapping on the storage system's DeviceManager.
- After HyperMetro synchronization is complete, run the cfgmgr command on the host to scan disks.
- Run the lspath -F "name:parent:connection:path_id:status" command to check whether the paths of the involved LUN are identified successfully.
If the host uses Huawei UltraPath, change LUN mappings by following instructions in the FAQ of the OceanStor UltraPath for XXX User Guide. XXX represents the OS, such as AIX.