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. For ESX/ESXi 4.x hosts, use vicfg-scsidevs. For ESX/ESXi 3.5 systems, the corresponding command is vicfg-vmhbadevs.
You can run one of the following commands to examine LUNs. Specify one of the connection options listed in Connection Options 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.
naa.5000c50006ee9cc7
Display Name: Local SEAGATE Disk (naa.5000c50006ee9cc7)
Has Settable Display Name: true
Size: 286102
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/naa.5000c50006ee9cc7
Vendor: SEAGATE
Model: ST3300555SS
Revision: T211
SCSI Level: 5
Is Pseudo: false
Status: on
Is RDM Capable: true
Is Local: true
Is Removable: false
Is SSD: false
Thin Provisioning Status: unknown
Attached Filters:
VAAI Status: unknown
VAAI Plugin Name:
Other UIDs: vml.02000000005000c50006ee9cc7535433333030
mpx.vmhba0:C0:T0:L0
   ...
   Attached Filters:
VAAI Status: unsupported
VAAI Plugin Name:
Other UIDs: vml.0005000000766d686261303a303a30
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 ESX/ESXi 4.x hosts. For ESX/ESXi 3.5 systems, the corresponding command is vicfg-vmhbadevs.
Important You can run vicfg-scsidevs --query and vicfg-scsidevs --vmfs against ESX/ESXi version 3.5. The other options are supported only against ESX/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 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