Examining LUNs
A LUN (Logical Unit Number) is an identifier for a disk volume in a storage array target.
Target and Device Representation
In the ESXi context, the term target identifies a single storage unit that a host can access. The terms device and LUN describe a logical volume that represents storage space on a target. The terms device and LUN mean a SCSI volume presented to the host from a storage target.
Different storage vendors present their storage systems to ESXi hosts in different ways. Some vendors present a single target with multiple LUNs on it. Other vendors, especially iSCSI vendors, present multiple targets with one LUN each.
Target and LUN Representations
In Target and LUN Representations, three LUNs are available in each configuration. On the left, the host sees one target, but that target has three LUNs that can be used. Each LUN represents an individual storage volume. On the right, the host sees three different targets, each having one LUN.
Examining LUNs with esxcli storage core
Use esxcli storage core to display information about available LUNs on ESXi 5.0.
You can run one of the following commands to examine LUNs. Specify one of the connection options listed in Connection Options for vCLI Host Management Commands in place of <conn_options>.
esxcli <conn_options> storage core device list
The command lists device information for all logical devices on this system. The information includes the name (UUID), device type, display name, and multipathing plugin. Specify the - -device option to only list information about a specific device. See Storage Device Naming for background information.
naa.5000c50037b3967e
Display Name: <name> (naa.5000c50037b3967e)
Has Settable Display Name: true
Size: 953869
Device Type: Direct-Access
...
naa.500000e014e7a4e0
Display Name: <name> (naa.500000e014e7a4e0)
Has Settable Display Name: true
Size: 70007
Device Type: Direct-Access
...
mpx.vmhba0:C0:T0:L0
Display Name: Local <name> CD-ROM (mpx.vmhba0:C0:T0:L0)
Has Settable Display Name: false
Size: 0
Device Type: CD-ROM
esxcli <conn_options> storage core device list -d mpx.vmhba32:C0:T1:L0
esxcli <conn_options> storage core device list
The command lists the primary UID for each device (naa.xxx or other primary name) and any other UIDs for each UID (VML name). You can specify - -device to only list information for a specific device.
esxcli <conn_option> storage filesystem list
esxcli <conn_options> storage core adapter list
The return value includes adapter and UID information.
esxcli <conn_options> storage core path list
Examining LUNs with vicfg-scsidevs
Use vicfg-scsidevs to display information about available LUNs on ESXi 4.x hosts.
Important You can run vicfg-scsidevs - -query and vicfg-scsidevs - -vmfs against ESXi version 3.5. The other options are supported only against ESXi version 4.0 and later.
You can run one of the following commands to examine LUNs. Specify one of the connection options listed in Connection Options for vCLI Host Management Commands in place of <conn_options>.
vicfg-scsidevs <conn_options> --list
The command lists device information for all logical devices on this system. The information includes the name (UUID), device type, display name, and multipathing plugin. Specify the - -device option to only list information about a specific device. The following example shows output for two devices; the actual listing might include multiple devices and the precise format differs between releases.
mpx.vmhba2:C0:T1:L0
Device Type: cdrom
Size: 0 MB
Display Name: Local HL-DT-ST (mpx.vmhba2:C0:T1:L0)
Plugin: NMP
Console Device: /vmfs/devices/cdrom/mpx.vmhba2:C0:T1:L0
Devfs Path: /vmfs/devices/cdrom/mpx.vmhba2:C0:T1:L0
Vendor: SONY Model: DVD-ROM GDRXX8XX Revis: 3.00
SCSI Level: 5 Is Pseudo: Status:
Is RDM Capable: Is Removable:
Other Names:
vml.000N000000XXXdXXXXXXXXaXXXaXX
VAAI Status: nnnn
 
naa.60060...
Device Type: disk
Size: 614400 MB
Display Name: DGC Fibre Channel Disk (naa.60060...)
...
vicfg-scsidevs <conn_options> --compact-list
The information includes the device ID, device type, size, plugin, and device display name.
vicfg-scsidevs <conn_options> --uids
The command lists the primary UID for each device (naa.xxx or other primary name) and any other UIDs for each UID (VML name). You can specify - -device to only list information for a specific device.
vicfg-scsidevs <conn_options> -l -d mpx.vmhba32:C0:T1:L0
vicfg-scsidevs <conn_options> --vmfs
vicfg-scsidevs <conn_options> --hbas
The return value includes the adapter ID, driver ID, adapter UID, PCI, vendor, and model.
vicfg-scsidevs <conn_options> --hba-device-list