Thursday, July 30, 2015

Find HBA WWPN in RHEL / CentOS 5.x





Find HBA WWPN in RHEL / CentOS 5.X

Method1:

1) Run the following command to find the manufacturer of the HBA card


[root@host ~]# lspci |grep -i HBA
07:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
0a:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)


2) To find the WWPN number use the following command and look for port_name

 systool -c fc_host -v

[root@host ~]# systool -c fc_host -v |grep "port_name"
    port_name           = "0x500XXXXXXXXXXX7e"
    port_name           = "0x500XXXXXXXXXXX4a"


Method2:

[root@host ~]# cat /sys/class/scsi_host/host1/device/fc_host\:host1/port_name
0x500XXXXXXXXXXX7e
[root@host~]# cat /sys/class/scsi_host/host0/device/fc_host\:host0/port_name
0x500XXXXXXXXXXX4a