How to find hba details and wwn in solaris and linux

How to find HBA Details & WWN in Solaris & RHEL

RSY Digital World Logo

How to find HBA details and WWN in Solaris and Linux

Scenario

There may be situation you need to get WWN number from Solaris or RHEL Servers. It may be because you may have request to extend file system running on veritas or under LVM and you need to place request for storage team to provide storage as per your requirement.This tutorial is about how to find hba details and wwn in solaris and linux.

Solution

1. Finding Details about HBA

First of all you just need to verify if server already have storage card installed on it. Considering the facts here that storage card is already installed on it.But in any case you can validate that storage card is already installed on it. Mostly used cards are either from Emulex or qlc .These cards are named as HBA [Host Bus Adaptors].

For Solaris

 You can use prtdiag or luxadm to get details about installed HBA.

1. # luxadm -e port  
CONNECTED/devices/ssm@0,0/pci@18,600000/SUNW,emlxs@1/fp@0,0:devctl
CONNECTED/devices/ssm@0,0/pci@18,600000/SUNW,emlxs@1,1/fp@0,0:devctl
CONNECTED/devices/ssm@0,0/pci@1c,600000/SUNW,emlxs@1/fp@0,0:devctl
CONNECTED/devices/ssm@0,0/pci@1c,600000/SUNW,emlxs@1,1/fp@0,0:devctl
2. # prtdiag –v 
Below is truncated output ,you need to focus on IO Card configurations .
========================= IO Cards =========================                         Bus  Max     IO   Port Bus       Freq Bus  Dev,Brd  Type  ID  Side Slot MHz  Freq Func State
Name                              Model---- ---- ---- ---- ---- ---- ---- ---- ----- --------------------------------  ----------------------I/O   PCI   8    B    4    33   33  1,0  ok    pci-pci1011,26.5/SUNW,qlc (scsi-+ PCI-BRIDGEI/O   PCI   8    B    4    33   33  4,0  ok    SUNW,qlc-pci1077,2200.1077.4083.+ device on pci-bridgeI/O   PCI   8    A    1    66   66  1,0 
ok    SUNW,emlxs-pci10df,fc00/fp (fp)   LP10000DC-SI/O   PCI   8    A    1    66   66  1,1  ok    SUNW,emlxs-pci10df,fc00/fp (fp)   LP10000DC-S
For Linux 
lspci or dmesg cab be used to  get details about installed HBA.
1.  #  lspci |egrep “Emulex|qlc”
2.  # dmesg |egrep “Emulex|qlc” 

2. Finding WWN for Solaris/RHEL

For Solaris
1. fcinfo internal solaris command can help to get WWN.
[root@server]# fcinfo hba-port
HBA Port WWN: 10000000c9c1852a
OS Device Name: /dev/cfg/c2
Manufacturer: Emulex
Model: LPe12000-S
Firmware Version: 2.01a10 (U3D2.01A10)
FCode/BIOS Version: Boot:5.03a0 Fcode:3.01a1
Serial Number: 4925383+144400D4F3
Driver Name: emlxs
Driver Version: 3.0.05.0 (2015.09.16.13.00)
Type: N-port
State: online
Supported Speeds: 2Gb 4Gb 8Gb
Current Speed: 8Gb
Node WWN: 20000000c9c1852a
HBA Port WWN: 10000000c9c17ea6
OS Device Name: /dev/cfg/c3
Manufacturer: Emulex
Model: LPe12000-S
Firmware Version: 2.01a10 (U3D2.01A10)
FCode/BIOS Version: Boot:5.03a0 Fcode:3.01a1
Serial Number: 4925383+144400D4F5
Driver Name: emlxs
Driver Version: 3.0.05.0 (2015.09.16.13.00)
Type: N-port
State: online
Supported Speeds: 2Gb 4Gb 8Gb
Current Speed: 8Gb
Node WWN: 20000000c9c17ea6
[root@server]#

2. Solaris default hardware related command prtconf will be also helpful to get WWN.

[root@server]# prtconf -vp |grep -i WWN
port_wwn:  10000000.c9c1852a
node_wwn:  20000000.c9c1852a
port_wwn:  10000000.c9c17ea6
node_wwn:  20000000.c9c17ea6

3. luxadm is useful in getting WWN on Solaris Servers.

[root@server]# luxadm -e port
/devices/pci@8000/pci@4/pci@0/pci@8/SUNW,emlxs@0/fp@0,0:devctl     CONNECTED
/devices/pci@8100/pci@4/pci@0/pci@1/SUNW,emlxs@0/fp@0,0:devctl     CONNECTED
[root@server]# luxadm -e dump_map /devices/pci@8000/pci@4/pci@0/pci@8/SUNW,emlxs@0/fp@0,0:devctl
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    155200  0         50060e8007dd6c68 50060e8007dd6c68 0x0  (Disk device)
1    151700  0         10000000c9c1852a 20000000c9c1852a 0x1f (Unknown Type,Host Bus Adapter)
4. syminq is handy to get WWN if your system have SYMCLI installed.
# syminq hba

For RHEL

1.  hbacmd command can be used to get WWN. It will work if hbanyware package is installed on server.

[root@server]# /usr/sbin/hbanyware/hbacmd listHBAs
Manageable HBA List
Port WWN   : 10:00:00:00:c9:b0:55:2e
Node WWN   : 20:00:00:00:c9:b0:55:2e
Fabric Name: 10:00:50:eb:1a:5f:c7:0c
Flags      : 8000fe00
Host Name  : server
Mfg        : Emulex Corporation
Serial No. : BT01474056
Port Number: n/a
Mode       : Initiator
Port WWN   : 10:00:00:00:c9:b0:51:32
Node WWN   : 20:00:00:00:c9:b0:51:32
Fabric Name: 10:00:50:eb:1a:5f:bd:0c
Flags      : 8000fe00
Host Name  : server
Mfg        : Emulex Corporation
Serial No. : BT01472998
Port Number: n/a
Mode       : Initiator
[root@server]#

2. port_name file can be used to get WWN from most of the RHEL servers.

[root@server]# cat /sys/class/fc_host/host*/port_name

0x10000000c9b0552e

0x10000000c9b05132

3. syminq can be used for RHEL as well as Solaris in getting WWN in case if SYMCLI installed .Mostly worked with EMC storage environment where SYMCLI is installed with PowerPath.

[root@server]# syminq hba
Host Name : server
HBA Type            : FibreChannel
HBA Name            : Emulex-LPe11000-E-2
Vendor              : Emulex Corporation
Model               : LPe11000-E
Serial Number       : BT01473025
Firmware Version   : 2.72A2 (Z3D2.72A2), sli-3
Driver Version      : 8.2.0.63.3p; HBAAPI(I) v2.1.g, 12-07-07

Node WWN            : 20000000c9b0513a
Number of Ports     : 1
Port WWN            : 10000000c9b0513a
Port name           : /sys/class/scsi_host/host3
Port type           : NPort
Port FCID           : 2764032
Port speed          : 4gbit
Supported speed     : 4gbit
Port state          : Online
Supported COS       : 00000008
Supported FC4 types : 0000010000000001000000000000000000000000000000000000000000000000
Active FC4 types    : 0000010000000001000000000000000000000000000000000000000000000000
Max frame size      : 2048

I hope this will be helpful to find HBA details and WWN on Solaris and RHEL if Emulex or QLC HBA is used. It will be effective in most of the cases but not all.We will be really glad to know if it is found useful to you and request you to share with your team and friends which might help them as well if sounds OK.

CLICK ME & Join FB group

Fo*T6Hd9Q&bids=145238   ShowCoverShowCoverFo*T6Hd9Q&bids=145238