List of commands to check WWN of online FC in HPUX server. Article also includes small script which can do this task in seconds!
For FC connectivity to storage on HPUX server, we must share WWN of online FC. Getting WWN is a three step process :
Identify FC devices under ioscan output.
# ioscan -fnCfc
Class I H/W Path Driver S/W State H/W Type Description
fc 0 2/0/10/1/0 fcd CLAIMED INTERFACE HP AB379-60101 4Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 1)
fc 1 2/0/10/1/1 fcd CLAIMED INTERFACE HP AB379-60101 4Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 2)
fc 2 2/0/12/1/0 fcd CLAIMED INTERFACE HP AB379-60101 4Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 1)
fc 3 2/0/12/1/1 fcd CLAIMED INTERFACE HP AB379-60101 4Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 2)
In above output you can see /dev/fcd0 to 3 are FC devices.
Check which FCs are online i.e. have cable connectivity with fcmsutil output.
# fcmsutil /dev/fcd0
Vendor ID is = 0x1077
Device ID is = 0x2422
PCI Sub-system Vendor ID is = 0x103C
PCI Sub-system ID is = 0x12D7
PCI Mode = PCI-X 133 MHz
ISP Code version = 5.4.0
ISP Chip version = 3
Topology = PTTOPT_FABRIC
Link Speed = 4Gb
Local N_Port_id is = 0x010300
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x50060b00006975ed
N_Port Port World Wide Name = 0x50060b00006975ec
Switch Port World Wide Name = 0x200300051e046c0f
Switch Node World Wide Name = 0x100000051e046c0f
N_Port Symbolic Port Name = server1_fcd0
N_Port Symbolic Node Name = server1_HP-UX_B.11.31
Hardware Path is = 2/0/10/1/0
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
TYPE = PFC
NPIV Supported = YES
Driver Version = @(#) fcd B.11.31.1103 Dec 6 2010
Check driver state in above output (highlighted). If its ONLINE that means this FC has cable connectivity. If its ‘Awaiting Link UP’ then it does not have cable connectivity.
If its online check its WWN by checking ‘N_Port Port World Wide Name’ value! Thats it. So WWN of above FC is 0x50060b00006975ec.
I have compiled all above steps in single script which you can run and get WWN of online FC in seconds.
First test script in test server. Run it on your own risk.
Sample output :
# sh test.sh
FC : /dev/fcd0
FC : /dev/fcd2