How to customize DMPNODE names for HUAWEI storage which does not support AVID using vxdmpadm setattr enclosure
Description
Veritas supports a scalable framework enabling users to fully customize enclosure & device names on a host by manually associating a customized names based on shortended cabinet and LUN serial numbers.
The Dynamic Multi-Pathing (DMP) node name is the metadevice name that represents the multiple paths to a disk.
You can specify a customized name for a DMPNODE.
As configurations in data centers continue to scale up and more SAN devices and nodes have to be managed, there is a greater need for consistency and predictability in device naming.
Volume Manager supports two main device naming schemes:
Operating System Native (OSN) naming
Enclosure Based Names (EBN) naming
The Device Discovery Layer (DDL) generates the DMPNODE name from the device name according to the defined VxVM naming scheme.
Volume Manager (VxVM) will sort the devices based on the LUN serial number (LSN) and uses the index to create the suffix for the device name. All nodes that see the same set of devices, will have the same sorted list, leading to some sort of consistent device indices across the cluster.
Device indexing can be inconsistent as it does not consistently uniquely identify the device.
To overcome this limitation Veritas introduced a third naming convention sometimes referred as "EBN_AVID" to enable device name consistency.
EBN = Enclosure Based Naming
AVID= Array Volume Identifier
How the introduction of the AVID features makes life easier
With the introduction of the EBN_AVID naming scheme, identifying storage devices becomes far easier with consistent device naming across multiple nodes connected to the same storage. The same disk access (da) name will never change as it is based on the name defined at the array level.
When Volume Manager (VxVM) does not have access to a device AVID, it retrieves another unique LUN identifier called LUN serial number and reverts back to LUN indexing.
Huawei storage does not support (expose) the value-add Veritas AVID.
https://support.huawei.com/enterprise/kz/doc/EDOC1100113071/50858c01/veritas-symantec-dmp
Unless the array vendor can expose the AVID value via their specifc Array Support LIbrary (ASL), manual customization of enclosures & DMPNODE names may be required to ensure consistent device names across clustered or LDOM configurations.
Setting customized names for enclosures
When considering customized DMPNODEs, it makes sense to make the enclosure name as unique and consistent as possible.
Enclosure name consistency usually is not a problem, even when hosts are connected to multiple enclosures of the same type, as the number of enclosures is small enough that consistency, however, some customization of the enclosure names may be required.
Sample output
# vxdmpadm listenclosure all
ENCLR_NAME ENCLR_TYPE ENCLR_SNO STATUS ARRAY_TYPE LUN_COUNT FIRMWARE
===================================================================================================
fred_nvme2 NVMe PHLN0115012C6P4EGN-1 CONNECTED A/A 1 -
fred_nvme1 NVMe PHLN011300TT6P4EGN-2 CONNECTED A/A 1 -
fred_nvme3 NVMe PHLN0115012C6P4EGN-2 CONNECTED A/A 1 -
fred_nvme0 NVMe PHLN011300TT6P4EGN-1 CONNECTED A/A 1 -
huawei-xsg10 HUAWEI-XSG1 210018cf24deecff CONNECTED ALUA 6 6000
The last 4 digits of the Enclosure (Cabinet) Serial Number can be used to make the enclosure unique and consistent, rather than basing the enclosure on a enclosure index. The enclosure index is based and sorted on the Enclosure Serial Number.
To specify a customized name for an enclosure, use the following syntax:
# vxdmpadm setattr enclosure enc_name name=custom_name
The last 4 digits of the Enclosure Serial Number (210018cf24deecff ) shown above are "ecff"
# vxdmpadm setattr enclosure huawei-xsg10 name=huawei_ecff
Once executed, the updated customized enclosure name will be visible.
# vxdmpadm listenclosure all
ENCLR_NAME ENCLR_TYPE ENCLR_SNO STATUS ARRAY_TYPE LUN_COUNT FIRMWARE
===================================================================================================
fred_nvme2 NVMe PHLN0115012C6P4EGN-1 CONNECTED A/A 1 -
fred_nvme1 NVMe PHLN011300TT6P4EGN-2 CONNECTED A/A 1 -
fred_nvme3 NVMe PHLN0115012C6P4EGN-2 CONNECTED A/A 1 -
fred_nvme0 NVMe PHLN011300TT6P4EGN-1 CONNECTED A/A 1 -
huawei_ecff HUAWEI-XSG1 210018cf24deecff CONNECTED ALUA 5 6000
The customized enclosure naming details are persistently stored in the /etc/vx/array.info file:
Sample output:
# cat /etc/vx/array.info
PHLN0115012C6P4EGN-1
fred_nvme2
0
NVMe
PHLN011300TT6P4EGN-2
fred_nvme1
0
NVMe
PHLN0115012C6P4EGN-2
fred_nvme3
0
NVMe
PHLN011300TT6P4EGN-1
fred_nvme0
0
NVMe
ALUAdisk
aluadisk
0
aluadisk
210018cf24deecff
huawei_ecff
0
HUAWEI-XSG1
Setting customized names for DMPNODEs
When trying to customize a DMPNODE name, dmp_native_support may be enabled and prevent any customized naming, until it is disabled. It can then be enabled again once the customized naming is complete:
# vxdmpadm settune dmp_native_support=off
User-specified names are persistent even if persistence naming is turned off.
You cannot assign a customized name that is already in use by a device. The customized name must be unique.
# vxdisk -px LIST_DMP -u g list
DEVICE NUM_PATHS LUN_SERIAL_NO CAB_SERIAL_NO ENCLOSURE_NAME ATYPE PHYS_CTLR_NAME LUN_SIZE
HW_MA8A1G061_RPOOL_D1 4 618CF24100DEECFF91A53F43000002F7 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 400.00g
HW_MA8A1G061_SWPOOL_D1 4 618CF24100DEECFF91A54571000002F8 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 200.00g
huawei_ecff_3 4 618CF24100DEECFF91A5599B000002FB 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 1.00g
huawei_ecff_5 4 618CF24100DEECFF91A56376000002FD 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 1.00g
huawei_ecff_7 4 618CF24100DEECFF91A55DEC000002FC 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 1.00g
fred_nvme0_0 1 F15232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-1 ma8a1c000_nvme0 A/A /pci@315/pci@1/pci@0/pci@1/nvme@0 2980.82g
fred_nvme1_0 1 515232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-2 ma8a1c000_nvme1 A/A /pci@315/pci@1/pci@0/pci@2/nvme@0 2980.82g
fred_nvme2_0 1 F152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-1 ma8a1c000_nvme2 A/A /pci@31a/pci@1/pci@0/pci@1/nvme@0 2980.82g
fred_nvme3_0 1 5152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-2 ma8a1c000_nvme3 A/A /pci@31a/pci@1/pci@0/pci@2/nvme@0 2980.82g
The following DMPNODE "huawei_ecff_3" can be customized by taking the last 4 trailing digits of the LUN Serial No "618CF24100DEECFF91A5599B000002FB" to make it unique:
# vxdmpadm setattr dmpnode huawei_ecff_3 name=huawei-ecff_02FB
# vxdisk -eo alldgs list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR
HW_MA8A1G061_RPOOL_D1 auto:ZFS - - ZFS c8t29A118CF24DEECFFd1s2 tprclm
HW_MA8A1G061_SWPOOL_D1 auto - - error c8t28C118CF24DEECFFd2s2 tprclm
huawei_ecff_02FB auto:cdsdisk - - online thinrclm c8t28C118CF24DEECFFd3s2 tprclm
huawei_ecff_5 auto - - error c8t29A118CF24DEECFFd5s2 tprclm
huawei_ecff_7 auto - - error c8t28C118CF24DEECFFd4s2 tprclm
fred_nvme0_0 auto:ZFS - - ZFS c1t1d0 ssd
fred_nvme1_0 auto:none - - online invalid c2t1d0 ssd
fred_nvme2_0 auto:ZFS - - ZFS c4t1d0 ssd
fred_nvme3_0 auto:ZFS - - ZFS c5t1d0 ssd
# vxdisk -px LIST_DMP list
DEVICE NUM_PATHS LUN_SERIAL_NO CAB_SERIAL_NO ENCLOSURE_NAME ATYPE PHYS_CTLR_NAME LUN_SIZE
HW_MA8A1G061_RPOOL_D1 4 618CF24100DEECFF91A53F43000002F7 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 838860800
HW_MA8A1G061_SWPOOL_D1 4 618CF24100DEECFF91A54571000002F8 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 419430400
huawei_ecff_02FB 4 618CF24100DEECFF91A5599B000002FB 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
huawei_ecff_5 4 618CF24100DEECFF91A56376000002FD 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
huawei_ecff_7 4 618CF24100DEECFF91A55DEC000002FC 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
fred_nvme0_0 1 F15232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-1 ma8a1c000_nvme0 A/A /pci@315/pci@1/pci@0/pci@1/nvme@0 6251233968
fred_nvme1_0 1 515232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-2 ma8a1c000_nvme1 A/A /pci@315/pci@1/pci@0/pci@2/nvme@0 6251233968
fred_nvme2_0 1 F152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-1 ma8a1c000_nvme2 A/A /pci@31a/pci@1/pci@0/pci@1/nvme@0 6251233968
fred_nvme3_0 1 5152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-2 ma8a1c000_nvme3 A/A /pci@31a/pci@1/pci@0/pci@2/nvme@0 6251233968
The following DMPNODE "huawei_ecff_5" can be customized by taking the last 4 trailing digits of the LUN Serial No "618CF24100DEECFF91A56376000002FD" to make it unique:
# vxdmpadm setattr dmpnode huawei_ecff_3 name=huawei-ecff_02FB
NOTE: The last 4 trailing digits of the LUN Serial No (LSN) should be unique enough to manually classify it as an AVID unqiue identifier.
Revised DMPNODE names:
# vxdisk -px LIST_DMP list
DEVICE NUM_PATHS LUN_SERIAL_NO CAB_SERIAL_NO ENCLOSURE_NAME ATYPE PHYS_CTLR_NAME LUN_SIZE
HW_MA8A1G061_RPOOL_D1 4 618CF24100DEECFF91A53F43000002F7 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 838860800
HW_MA8A1G061_SWPOOL_D1 4 618CF24100DEECFF91A54571000002F8 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 419430400
huawei_ecff_02FB 4 618CF24100DEECFF91A5599B000002FB 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
huawei_ecff_02FD 4 618CF24100DEECFF91A56376000002FD 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
huawei_ecff_7 4 618CF24100DEECFF91A55DEC000002FC 210018cf24deecff huawei_ecff ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
fred_nvme0_0 1 F15232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-1 ma8a1c000_nvme0 A/A /pci@315/pci@1/pci@0/pci@1/nvme@0 6251233968
fred_nvme1_0 1 515232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-2 ma8a1c000_nvme1 A/A /pci@315/pci@1/pci@0/pci@2/nvme@0 6251233968
fred_nvme2_0 1 F152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-1 ma8a1c000_nvme2 A/A /pci@31a/pci@1/pci@0/pci@1/nvme@0 6251233968
fred_nvme3_0 1 5152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-2 ma8a1c000_nvme3 A/A /pci@31a/pci@1/pci@0/pci@2/nvme@0 6251233968
The customized DMPNODE names are persistently stored in the /etc/vx/dmpnames.info file:
Sample output
# cat /etc/vx/dmpnames.info
HUAWEI%5FXSG1%5F210018cf24deecff%5F618CF24100DEECFF91A56376000002FD huawei_ecff_02FD
HUAWEI%5FXSG1%5F210018cf24deecff%5F618CF24100DEECFF91A5599B000002FB huawei_ecff_02FB
HUAWEI%5FXSG1%5F210018cf24deecff%5F618CF24100DEECFF91A54571000002F8 HW_MA8A1G061_SWPOOL_D1
HUAWEI%5FXSG1%5F210018cf24deecff%5F618CF24100DEECFF91A53F43000002F7 HW_MA8A1G061_RPOOL_D1
How to clear (reset) customized names
To clear the customized names, and revert back to using the default operating system-based naming or enclosure-based naming discovered by the DDL, use the following command:
# vxddladm -c assign names
The /etc/vx/array.info file contents will revert back to the default naming conventions.
# cat /etc/vx/array.info
PHLN011300TT6P4EGN-2
fred_nvme1
0
NVMe
PHLN0115012C6P4EGN-1
fred_nvme2
0
NVMe
PHLN0115012C6P4EGN-2
fred_nvme3
0
NVMe
PHLN011300TT6P4EGN-1
fred_nvme0
0
NVMe
210018cf24deecff
huawei-xsg10
0
HUAWEI-XSG1
The command will also reset the entries in the /etc/vx/dmpnames.info file.
Default naming now seen:
# vxdisk -px LIST_DMP list
DEVICE NUM_PATHS LUN_SERIAL_NO CAB_SERIAL_NO ENCLOSURE_NAME ATYPE PHYS_CTLR_NAME LUN_SIZE
huawei-xsg10_0 4 618CF24100DEECFF91A53F43000002F7 210018cf24deecff huawei-xsg10 ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 838860800
huawei-xsg10_1 4 618CF24100DEECFF91A54571000002F8 210018cf24deecff huawei-xsg10 ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 419430400
huawei-xsg10_2 4 618CF24100DEECFF91A5599B000002FB 210018cf24deecff huawei-xsg10 ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
huawei-xsg10_3 4 618CF24100DEECFF91A55DEC000002FC 210018cf24deecff huawei-xsg10 ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
huawei-xsg10_4 4 618CF24100DEECFF91A56376000002FD 210018cf24deecff huawei-xsg10 ALUA /pci@314/pci@1/SUNW,qlc@0,1/fp@0,0 2097152
fred_nvme0_0 1 F15232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-1 ma8a1c000_nvme0 A/A /pci@315/pci@1/pci@0/pci@1/nvme@0 6251233968
fred_nvme1_0 1 515232B354E4D25C0000000100000001 PHLN011300TT6P4EGN-2 ma8a1c000_nvme1 A/A /pci@315/pci@1/pci@0/pci@2/nvme@0 6251233968
fred_nvme2_0 1 F152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-1 ma8a1c000_nvme2 A/A /pci@31a/pci@1/pci@0/pci@1/nvme@0 6251233968
fred_nvme3_0 1 5152345EC1E4D25C0000000100000001 PHLN0115012C6P4EGN-2 ma8a1c000_nvme3 A/A /pci@31a/pci@1/pci@0/pci@2/nvme@0 6251233968