Displaying Disk UUID

Edit: Some links no longer work.

Originally posted December 3, 2013 on AIXchange

If you’re on a mailing list for IBMers and business partners, you saw this information from Russell Adams earlier this fall. For the benefit of those who aren’t on that list, and with Russell’s permission, I’m reposting it here. (Note there are minor edits for the sake of clarity.)

AIX 6.1 TL7 introduced a new flag for the lspv command. It shows the unique ID (UUID) of disks in additional columns of the lspv output.

This new lspv -u is particularly useful in VIO server environments using vSCSI because the VIO client LPAR hdisk UDID contains the real UDID from the VIO server hdisk.

For example on a client LPAR using VSCSI for the rootvg (merged columns and spaces in the UDID are not a paste error)

… our client UDID contains the UDID from the VIO server with a prefix and suffix (where ^ indicates the prefix and suffix added by the VIO server):

Using UDIDs, the client can be quickly cross-referenced to the server with the most significant bytes of the UDID — in this case the middle 15 digits.

Historically, to find the real LUN that a client is using in a VIO server environment would require these steps for each VIO server:

* Obtain client hdisk parent vscsi device hardware location code and LUN number.
* Lookup on HMC, which VIO server and slot the client vSCSI device is linked to.
* Lookup vhost adapter on the VIO server by slot number.
* Lookup vSCSI mappings for vhost adapter to location hdisk on the VIO server.

A client with dual VIO servers would have to repeat the procedure twice. PVIDs can also shortcut the process, but they may not show up on the VIO server’s lspv output until after they’re written to the client and the VIO server is rebooted. If the client rewrites the PVID, the VIO server can also be out of date. Thus UDIDs are the preferred method because they’re static values.

The output can stretch the columns until they merge and spaces in the UDID break the columns. Hopefully this will be fixed in a future release.

More Twitter discussion from @robmcnelly:

@neverfishagain Tesla and Power 8 #power http://lnkd.in/dnHrmtS

@brian_smi  The Shell Scripts that make up #AIX https://www.ibm.com/developerworks/community/blogs/brian/entry/the_shell_scripts_that_make_up_aix …

@ROOTvgNET http://www-01.ibm.com/support/docview.wss?uid=aixtools_home … – IBM AIX Support Center Tools – United States | Some great #aixtools you should know.

@chmod666 The guy who gives me my passion for #AIX has just opened a blog. Please check it http://www.aixpowerlevel.com  . Thank you @prosty !!!!

@robmcnelly RT @cgibbo RT @Prosty: How to download a specific package from IBM fix central http://aixpowerlevel.com/2013/11/how-to-download-a-specific-package-from-ibm-fix-central/ … #AIX