Adding Colons to LUN IDs

There comes a time where every vi admin will need to create a report which aggregates data from both the virtualization perspective, as well as from a storage perspective. VMware likes do display the unique LUN IDs one way, and EMC chooses to list the LUN IDs in a slightly different format. This makes mapping datastores to LUNs more time consuming and challenging.

Example of LUN ID from the vSphere Perspective:

naa.6006016094602800e07ff528b73ae011

 

Example of LUN ID from EMC storage perspective:

60:06:01:60:94:60:28:00:e0:7f:f5:28:b7:3a:e0:11

 

To simplify this I take the output from vSphere (whether using something like RVtools, PowerCLI, etc…) and the ouptut from EMC (somthing like CAP report generated from SP Collects) and get them both into Excel.

Next, I use find and replace in Excel to remove the “naa.” from the LUN UUID collected from VMware. I apply the following Excel formula to the string that is left after removing “naa.”

=LEFT(T181,2)&":"&MID(T181,3,2)&":"&MID(T181,5,2)&":"&MID(T181,7,2)&":"&MID(T181,9,2)&":"&MID(T181,11,2)&":"&MID(T181,13,2)&":"&MID(T181,15,2)&":"&MID(T181,17,2)&":"&MID(T181,19,2)&":"&MID(T181,21,2)&":"&MID(T181,23,2)&":"&MID(T181,25,2)&":"&MID(T181,27,2)&":"&MID(T181,29,2)&":"&RIGHT(T181,2)

 

Now it is very easy to do some vLookups between the two datasets!

Leave a Reply

Your email address will not be published. Required fields are marked *