During the VMware vSphere Optimize & Scale class you often get confronted with the situation that you see some high latencies on certain LUNs. But how can we find the datastore to that LUN’s canonical name?

 

Unfortunately, from resxtop you only get the unique canonical name of the LUN and not the corresponding datastore name. Instead of playing Sherlock Holmes and going through the properties of each datastore you have several opportunities to get the datastore and its LUN in one view.

Storage Views (vSphere 5.1)

Since vSphere 5.1 we have the opportunity to select the datastore in the Show all SCSI Volumes (LUN) view.

storageView

 

ESXCLI 

If we don’t have vSphere 5.1 or if we work in a larger environment with hundreds of LUNs I recommend the use of esxcli to find the corresponding datastore. Just connect via SSH or vCLI to the ESXi host and use the command

esxcli storage vmfs extent list

By using | grep and the last 5 digits of the canonical name you can easily find the corresponding datastore (e.g. esxcli storage vmfs extent list | grep b556e )

resxtop_esxcli_lun

I hope this will help you with the annoying search for the right datastores and reduces your time spending playing the ‘lun-detective’