Question:

How to WWPN of all LPARs or a specific LPAR using HMC command?

 

Solution:

 

To List WWPN of all LPARs on a managed system:

 

MS=Dev-BOX-9117-MMB-SN129SBCP
lshwres -r virtualio --rsubtype fc -m $MS --level lpar -F lpar_name,slot_num,wwpns --header |grep -v null
lpar_name,slot_num,wwpns
devaix101,5,"c05076036cfc002e,c05076036cfc002f"
devaix101,4,"c05078044abc002c,c05078044abc002d"
devaix101,3,"c05078044abc002a,c05078044abc002b"
devaix101,2,"c05078044abc0028,c05078044abc0029"
devaix102,5,"c05078044abc0538,c05078044abc0539"
devaix102,4,"c05078044abc0536,c05078044abc0537"
devaix102,3,"c05078044abc0534,c05078044abc0535"
devaix102,2,"c05078044abc0532,c05078044abc0533"
devaix103,5,"c05078044abc00c6,c05078044abc00c7"
devaix103,4,"c05078044abc00c4,c05078044abc00c5"
devaix103,3,"c05078044abc00c2,c05078044abc00c3"
devaix103,2,"c05078044abc00c0,c05078044abc00c1"

 

Please be noted slot_number is useful to identify the FC adapter on AIX.

For example:

On server devaix103

lsdev -Ccadapter|grep fcs
fcs0 Available C2-T1 Virtual Fibre Channel Client Adapter
fcs1 Available C3-T1 Virtual Fibre Channel Client Adapter
fcs2 Available C4-T1 Virtual Fibre Channel Client Adapter
fcs3 Available C5-T1 Virtual Fibre Channel Client Adapter

 

The location of fcs0 is C2, which means its slot_number is 2.

 

To List WWPN of a specific LPAR:

MS=Dev-BOX-9117-MMB-SN129SBCP
LPAR=devaix103
lshwres -r virtualio --rsubtype fc -m $MS --filter lpar_names=$LPAR --level lpar -F lpar_name,slot_num,wwpns --header

lpar_name,slot_num,wwpns

devaix103,5,”c05078044abc00c6,c05078044abc00c7″

devaix103,4,”c05078044abc00c4,c05078044abc00c5″
devaix103,3,”c05078044abc00c2,c05078044abc00c3″
devaix103,2,”c05078044abc00c0,c05078044abc00c1″