Everyday Virtualization

Blog archive

Which LUN is Which?

When it comes to administering and designing a virtualized infrastructure, storage is one of the cornerstones of a successful design. Provisioning storage is also a mixed bag of what your best practice is and it can vary greatly by the storage in use.

My private lab has a storage system with a number of iSCSI LUNs available to a number of ESXi hosts. Some of the ESXi hosts are virtual machines themselves utilizing the host as a guest backdoor. I have one LUN for my ESXi host installed on my primary server, and a number of LUNs that are allocated for test purposes. Fig. 1 shows an ESXi host (that is a guest VM) connected to the iSCSI network that shares all of these LUNs.

Visible LUNs
Figure 1. The LUNs visible to this host are shown in the storage configuration panel of a host. (Click image to view larger version.)

The question is, how do you know which LUN is which? One way is to expand the name column, as I've done in Fig. 1. This shows the name of the LUN as it is presented from the storage system. If you jump to the ESXi command line, you can enter this command to see this across all storage adapters:

esxcfg-mpath -L

This will show additional information, but is a little more cryptic to decipher the entire multipathing configuration. Fig. 2 shows this command run on the ESXi console.

Results of running esxcfg -mpath -L
Figure 2. The listing of paths has all of the information about each target. (Click image to view larger version.)

That's all fine and good, but how do we know which LUN is which? Well, that too depends on the storage system. You can easily tell them apart by size, that is if you make them different size. I'd prefer to make everything a uniform size myself. So, then how do you tell? Well in the examples below the LUN identifier number, or serial number is revealed in each entry.:

naa.6001a620000142303933393430303331

In the string above the bolded “1” indicates it is LUN 1. There is a LUN 0 (the 2 TB LUN) and two other 1024 GB LUNs, identified as LUN 2 and 3 with the same LUN identifier strings:

naa.6001a620000242303933393430303331
naa.6001a620000342303933393430303331

This can be a good spring board to roll the LUN identifier into the VMFS datastore name to avoid confusion down the road.

How do you distinguish LUNs from each other when it comes to naming the datastores? Share your comments below.

Posted by Rick Vanover on 02/09/2010 at 3:43 PM


Reader Comments:

Wed, Feb 10, 2010 Rick Vanover Grand Rapids, MI

Good points, guys. My issue with the device view is that it is still separated from the friendly Datastore name. Long live the CLI!

Wed, Feb 10, 2010 Les

I name datastores and LUNs with the same (or similar) name. Then select View: Path (instead of the default View: Devices). The LUN name will be listed under Target -- just compare Runtime Name to identify which device is which.

Wed, Feb 10, 2010 chris

sorry for the dupe comment!

Wed, Feb 10, 2010 Chris House Grand Rapids, MI

I name datastores with the array name and LUN number, to keep things simple. I may also include cluster number or purpose. Servers01_Cancer would be LUN 01 on Cancer array for VM servers. C2_D14_Solstice would be Cluster 2, Datstore 14 on the Solstice array (for VDI). esx01_scsi would be esx01 esx server's local scsi VMFS.

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above