How to Find Qlogic Fiber Channel HBA WWN's (World Wide Number)

9:57 PM

Find the instance of the card's name in the /proc filesystem

If you see '/proc/scsi/qla2xxx' in the output you have a Qlogic FC HBA.
$ sudo find /proc -type d -name qla2xxx
/proc/scsi/qla2xxx

Change into the qla2xxx directory

$ cd /proc/scsi/qla2xxx

To find the WWN for each of the two "ports," check the egrep results for the files that came back with the word "adapter-port" in them.

$ grep -l "target-" *|xargs egrep -i 'QLogic|scsi' /dev/null
0:QLogic PCI to Fibre Channel Host Adapter for QLE2462:
0:Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
0:SCSI Device Information:
0:scsi-qla0-adapter-node=2000001b32827b23;
0:scsi-qla0-adapter-port=2100001b32827b23;
0:scsi-qla0-target-0=5006016a39a04197;
0:scsi-qla0-port-0=50060160b9a04197:5006016a39a04197:3400ef:81;
0:SCSI LUN Information:
1:QLogic PCI to Fibre Channel Host Adapter for QLE2462:
1:Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
1:SCSI Device Information:
1:scsi-qla1-adapter-node=2001001b32a27b23;
1:scsi-qla1-adapter-port=2101001b32a27b23;
1:scsi-qla1-target-0=5006016239a04197;
1:scsi-qla1-port-0=50060160b9a04197:5006016239a04197:0103ef:81;
1:SCSI LUN Information:

Alternate Methods

This has been tested on RHEL 5.
$ cat /sys/class/scsi_host/host*/device/fc_host\:host*/port_name
0x500143800200b5c4
0x500143800200b5c6
This has been tested on RHEL 4 and 5.
$ /usr/bin/systool -c fc_host -v | grep port_name
    port_name           = "0x500110a0001798dc"
    port_name           = "0x500110a0001798de"
For RHEL 6.
$ cat /sys/class/fc_host/host[0-9]*/port_name
    port_name           = "0x500110a0001798dc"
    port_name           = "0x500110a0001798de"

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results