Correlating VML ID with naa ID in ESXi 7.x or later
search cancel

Correlating VML ID with naa ID in ESXi 7.x or later

book

Article ID: 379673

calendar_today

Updated On:

Products

VMware vSphere ESX 7.x VMware vSphere ESX 8.x

Issue/Introduction

This article provides information on finding the naa ID of the device from VML ID on the Storage array and decoding the content of VML ID.

Resolution

Find the naa id from the VML ID:

  • Run this command to find the associated VML ID for the LUN/storage device from the VMDK file name:

#vmkfstools --queryrdm /vmfs/volumes/4d8008a2-9940968c-04df-001e4f1fbf2a/VM-BAISC/ABC.vmdk
Disk /vmfs/volumes/4d8008a2-9940968c-04df-001e4f1fbf2a/node1/quorum.vmdk is a non Pass through Raw Device Mapping Maps to: vml.02000501006000eb3952315fbe0000000000000041695343534944,

  • Correlate VML ID for the LUN with the associated LUN to find the naa id.

 

For example, for a LUN with VML ID, vml.02000501006000eb3952315fbe0000000000000041695343534944,

The naa id of the LUN is from the above vml is 6000eb3952315fbe000000000000001b therefore the associated naa is is naa.6000eb3952315fbe000000000000001b.

In earlier versions of ESXi the vml reserverd 2 hexadecimal locations for the LUN ID in 7.X the vml not utilises 4 hexadecimal locations as highlighted in "Decoding VML ID" section below:

 

Decoding VML ID

The digits of the VML ID are divided into:

vml.      02      00      0501    00      6000eb3952315fbe0000000000000041         695343534944
AAAA   BB     CC     DDDD  EE     FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  GGGGGGGGGGGG

 

Note: Now since we utilize 4 hexadecimal locations of the vml for LUN IDs we have store the higher byte after the lower byte, This is for backward compatibility with ESXi releases that only supported LUNs up to 255

The higher byte (>0 for LUNs >= 256) is stored after the lower byte.

LUN ID repersented in vml: 0501 = 0105 hexadecimal

We need to convert the hexadecimal value of 0105 to decimal to get the LUN ID, in this example 0105 = Lun 256  


Where:

A - represents the legal namespace ID of the device as reported by the vmkernel. This is usually vml.

B - represents the type of name used to construct the UUID:

0x0 - For mpx.vmhbax:Cx:Tx:Lx format
0x1 - For serial number format
0x2 - For naa format
0x3 - For SYMM format

C - represents the device type.

D - represent the LUN number. The 4-digit ASCII number is the LUN number. In this case, the LUN number is LUN 261(0x105).

E - is reserved for future use

F - is the disk id. represents the identification information reported by the device that is based on one of the methods described in part B.
      In this case where type is naa. Disk id contains 32 byte naa number.

G- 12 byte is a unique hash of other data about the LUN.

Additional Information

https://knowledge.broadcom.com/external/article?articleNumber=318949 

C - Represents the device type: 
0x00 - DISK
0x01 - TAPE
0x02 - PRINTER
0x03 - PROCESSOR /* HP scanners use this */
0x04 - WORM /* Treated as ROM by our system */
0x05 - ROM 0x05
0x06 - SCANNER
0x07 - MOD /* Magneto-optical disk - * - treated as TYPE_DISK */
0x08 - MEDIUM_CHANGER
0x09 - COMM /* Communications device */
0x0c - RAID
0x0d - ENCLOSURE 0x0d /* Enclosure Services Device */
0x0e - RBC 0x0e
0x7f - NO_LUN