How to Find PVID and LUN ID of a Physical Volume in AIX

How to Find PVID and LUN ID of a Physical Volume in AIX

When the Physical Volume is allocated to a Logical Partition using NPIV vSCSI or any other protocol. There is a unique id that gets assigned to the Physical Volume by the Logical Partition. These identities are refereed as Physical Volume ID (PVID) and Logical Unit ID or simply refereed as LUN ID. Below are the commands to list the PVID and LUN ID for sample hdisk4.

Command to find PVID

# chdev -l hdisk4 -a pv=yes
# lsattr -El hdisk4 | grep pvid
pvid            00c00001122334440000000000000000        Physical volume identifier       False

The first 16 hexadecimal numbers are refereed as PVID in the above case the PVID of hdisk4 is 00c0000112233444.

Command to find LUN ID  

# lsattr -El hdisk4 | grep lun_id
lun_id       0x4000000000000         Logical Unit Number ID      False

In above example the LUN ID of hdisk4 is 0x4 a hexadecimal number. We need to convert it to decimal to find the exact LUN ID as its0x4 is 4 in decimal so LUN ID is 4.

Post a Comment