meta data for this page

AIX

AIX: Finding Fiber HBA WWN

Here are some useful commands.

lsdev -Cc adapter to find the adapter path first.
fcstat [adapter] to get full info
lscfg -vl [adapter] to get abbreviated info

Sometimes fcstat is not available. Never bothered to figure out way, I just move on to the lscfg since that is always available. Like I mentioned, sysadmins are creatures of habit and so I never bothered looking into why fcstat is not always available..

For this server, I have three dual port adapters in. But I’ll save you the trouble and just run “fcstat” and “lscfg” on one of them :)

Here is sample output

# lsdev -Cc adapter
cor0 Available 0A-00 GXT145 Graphics Adapter
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Logical Host Ethernet Port (lp-hea)
ent2 Available Logical Host Ethernet Port (lp-hea)
ent3 Available Logical Host Ethernet Port (lp-hea)
ent4 Available EtherChannel / IEEE 802.3ad Link Aggregation
fcs0 Available 03-00 4Gb FC PCI Express Adapter (df1000fe)
fcs1 Available 03-01 4Gb FC PCI Express Adapter (df1000fe)
fcs2 Available 04-00 4Gb FC PCI Express Adapter (df1000fe)
fcs3 Available 04-01 4Gb FC PCI Express Adapter (df1000fe)
fcs4 Available 06-00 4Gb FC PCI Express Adapter (df1000fe)
fcs5 Available 06-01 4Gb FC PCI Express Adapter (df1000fe)
lhea0 Available Logical Host Ethernet Adapter (l-hea)
sissas0 Available 00-08 PCI-X266 Planar 3Gb SAS RAID Adapter
sissas1 Available 01-08 PCI-X266 Planar 3Gb SAS RAID Adapter
usbhc0 Available 02-08 USB Host Controller (33103500)
usbhc1 Available 02-09 USB Host Controller (33103500)
usbhc2 Available 02-0a USB Enhanced Host Controller (3310e000)
vsa0 Defined LPAR Virtual Serial Adapter
vsa1 Available LPAR Virtual Serial Adapter
vsa2 Available LPAR Virtual Serial Adapter
#

You can tell they are dual port because the hardware paths are

03-00
03-01
04-00
04-01
06-00
06-01

Running our fcstat and lsdev commands:

# fcstat fcs0
 
FIBRE CHANNEL STATISTICS REPORT: fcs0
 
Device Type: 4Gb FC PCI Express Adapter (df1000fe) (adapter/pciex/df1000fe)
Serial Number: 1B84204CD5
Option ROM Version: 02E8277F
ZA: Z1F2.70A5
World Wide Node Name: 0x20000000C980DBE8
World Wide Port Name: 0x10000000C980DBE8
 
FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 4 GBIT
Port Speed (running): 4 GBIT
Port FC ID: 0x000001
Port Type: Private Loop
 
Seconds Since Last Reset: 1219675
 
Transmit Statistics Receive Statistics
------------------- ------------------
Frames: 203978 407400
Words: 2862592 12623616
 
LIP Count: 1
NOS Count: 0
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 0
Loss of Sync Count: 4
Loss of Signal: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 7
Invalid CRC Count: 0
 
IP over FC Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
 
FC SCSI Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
No Command Resource Count: 0
 
IP over FC Traffic Statistics
Input Requests: 0
Output Requests: 0
Control Requests: 0
Input Bytes: 0
Output Bytes: 0
 
FC SCSI Traffic Statistics
Input Requests: 203340
Output Requests: 10
Control Requests: 51
Input Bytes: 51849495
Output Bytes: 252
# lscfg -vl fcs0
fcs0 U78AB.001.WZSG050-P1-C3-T1 4Gb FC PCI Express Adapter (df1000fe)
 
Part Number.................10N7255
Serial Number...............1B84204CD5
Manufacturer................001B
EC Level....................D76626
Customer Card ID Number.....5774
FRU Number.................. 10N7255
Device Specific.(ZM)........3
Network Address.............10000000C980DBE8
ROS Level and ID............02E8277F
Device Specific.(Z0)........2057706D
Device Specific.(Z1)........00000000
Device Specific.(Z2)........00000000
Device Specific.(Z3)........03000909
Device Specific.(Z4)........FFE01212
Device Specific.(Z5)........02E8277F
Device Specific.(Z6)........06E12715
Device Specific.(Z7)........07E1277F
Device Specific.(Z8)........20000000C980DBE8
Device Specific.(Z9)........ZS2.71X15
Device Specific.(ZA)........Z1F2.70A5
Device Specific.(ZB)........Z2F2.71X15
Device Specific.(ZC)........00000000
Hardware Location Code......U78AB.001.WZSG050-P1-C3-T1
 
#

Other useful stuff

AIX is a beast.

Tame the beast. Here are some other useful commands for discovery

The above commands show you hardware paths for your HBA, in my server specifically:

fcs0	=	03-00
fsc1	=	03-01
 
fcs2	=	04-00
fcs3	=	04-01
 
fcs4	=	06-00
fcs5	=	06-01
 
lsdev -Cc disk

Listing the disks with the hardware path. This can help tell you which disks are talking to which HBA

Another example using “grep”

# lsdev -Cc disk | grep 06-01
hdisk20 Available 06-01-02 Hitachi MPIO Disk AMS.SMS.WMS (Fibre)
hdisk21 Available 06-01-02 Hitachi MPIO Disk AMS.SMS.WMS (Fibre)
hdisk22 Available 06-01-02 Hitachi MPIO Disk AMS.SMS.WMS (Fibre)
hdisk23 Available 06-01-02 Hitachi MPIO Disk AMS.SMS.WMS (Fibre)
hdisk24 Available 06-01-02 Hitachi MPIO Disk AMS.SMS.WMS (Fibre)
hdisk25 Available 06-01-02 Hitachi MPIO Disk AMS.SMS.WMS (Fibre)
#

These are my PVs that are talking to /dev/fcs5 HBA port.

From there you can use your normal lspv and lsvg commands to find out the mountpoints used by specific LUNS on storage.

lspath Find out multipaths to your storage.

As an example, I pulled a fiber cable and got this output:

# lspath
..
..
Missing hdisk20 fscsi4
Missing hdisk21 fscsi4
Missing hdisk22 fscsi4
Missing hdisk23 fscsi4
Missing hdisk24 fscsi4
Missing hdisk25 fscsi4
Enabled hdisk20 fscsi5
Enabled hdisk21 fscsi5
Enabled hdisk22 fscsi5
Enabled hdisk23 fscsi5
Enabled hdisk24 fscsi5
Enabled hdisk25 fscsi5
#

So you can see the PVs (e.g. hdisk20) are listed twice, which means there are two paths to each of these PVs. And the cable I pulled corresponds to fscsi4 a.k.a. fcs4 which is why the path is “missing”