How To Get Device ID, LUN ID, and NAA ID Of A VMware Datastore?

Spread The Knowledge

There could be many ways to get a unique identifier such as Device ID, LUN ID, and NAA ID of a VMware datastore. These identities represent the uniqueness of the datastores that helps you to get the exact datastore information and its associated metadata.

First let’s understand about these terms.

Device ID: Depending on the type of storage, the ESXi host uses different algorithms and conventions to generate an identifier for each storage device.

Storage-provided identifiers

The ESXi host queries a target storage device for the device name. From the returned metadata, the host extracts or generates a unique identifier for the device. The identifier is based on specific storage standards, is unique and persistent across all hosts, and has one of the following formats:


Path-based identifier

When the device does not provide an identifier, the host generates an mpx. path name, where path represents the first path to the device, for example, mpx.vmhba1:C0:T1:L3. This identifier can be used in the same way as the storage-provided identifies.

The mpx.path identifier is created for local devices on the assumption that their pathnames are unique. However, this identifier is not unique or persistent and can change after every system restart.

We can describe it as:

  • vmhba: It represents the name of the storage adapter.
  • C: It stands for Chanel, is the storage channel number.
  • T: T stands for Target, is the target number
  • L: LUN number that shows the position of the LUN within the target

LUN ID: The LUN number is provided by the storage system. If a target has only one LUN, the LUN number is always zero (0).

NAA ID: It is the storage provider identity that uniquely represents the storage device in vSphere. It starts with… numbers. NAA stands for Network Address Authority. To know more about it visit the site

Get the Device ID, LUN ID, and NAA ID from the VMware vSphere web client

To get these details in vSphere web client follow the below steps:

  1. Login to the vSphere Web Client.
  2. Navigate to Home – > Hosts and Clusters
Home - Hosts & Clusters
Home – Hosts & Clusters

3. Now select any host and navigate to Configure -> Storage Devices -> Click on any Device under the Storage Devices tab. This will provide you information about datastore’s NAA ID and LUN ID. Here LUN ID is 1 for the storage device I have selected.

Get The Identifier - NAA ID

Get the Device ID, LUN ID, and NAA ID from the VMware ESXCLI

When performing troubleshooting with ESXi host storage system, use command line tools which require you to identify a specific disk or LUN connected to ESXi hosts.

You can use the commands for ESXi 5.x & 6.x versions. Run the below command to generate a list of all LUN paths currently connected to the ESXi host.

esxcli storage core path list

The output will be similar:

Using username "root".
~ # esxcli storage core path list
   UID: fc.200000109b3c1b4b:100000109b3c1b4b-fc.50060160c7e01b0e:5006016247e01b0e-naa.6006016094602800e07ff528b73ae011
   Runtime Name: vmhba4:C0:T0:L0
   Device: naa.6006016094602800e07ff528b73ae011
   Device Display Name: DGC Fibre Channel Disk (naa.6006016094602800e07ff528b73ae011)
   Adapter: vmhba4
   Channel: 0
   Target: 0
   LUN: 0
   Plugin: NMP
   State: active
   Transport: fc
   Adapter Identifier: fc.200000109b3c1b4b:100000109b3c1b4b
   Target Identifier: fc.50060160c7e01b0e:5006016247e01b0e
   Adapter Transport Details: WWNN: 20:00:00:10:9b:3c:1b:4b WWPN: 10:00:00:10:9b:3c:1b:4b
   Target Transport Details: WWNN: 50:06:01:60:c7:e0:1b:0e WWPN: 50:06:01:62:47:e0:1b:0e
   Maximum IO Size: 33578920

To get the detail path information of a specific device , run the following commands:

esxcli storage core path list -d <device>

You can also run the below commands  to generate a list of LUNs currently connected to the ESXi host.

esxcli storage core device list

The output will be similiar:

Display Name: Local VMware Disk (mpx.vmhba2:C0:T0:L0)
Has Settable Display Name: false
Size: 286070
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/ mpx.vmhba2:C0:T0:L0
Vendor: VMware
Model: Block device
Revision: 1.0
SCSI Level: 2
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: false
Is SSD: false
Is Offline: false
Is Perennially Reserved: false
Thin Provisioning Status: unknown
Attached Filters:
VAAI Status: unsupported
Other UIDs: vml.0000000000766d686261323a303a30

What is UUID in VMware?

The UUID is a unique number assigned to a VMFS volume upon the creation of the volume. It may be included in syntax where you need to specify the full path of specific files on a datastore.

You’ll also like

Spread The Knowledge

Leave a Comment