https://access.redhat.com/articles/15321
Updated 2014年十一月24日20:53 -
Issue
- How do I find the
port_name
(WWPN) andnode_name
(WWNN) of a configured HBA in Red Hat Enterprise Linux ?
Environment
- Red Hat Enterprise Linux 5, 6, 7
Resolution
Attaching a RHEL system to a storage area network (SAN) will, in most environments, require knowing the port_name
and node_name
of the HBA. In Red Hat Enterprise Linux, use the commands below, substituting the appropriate "hostX" :
For port_name:
$ cat /sys/class/fc_host/host2/port_name
0x21000024ff2d1234
For node_name:
cat /sys/class/fc_host/host2/node_name
0x20000024ff2d1234
OR
HBA with ID host 11 has address 0000:04:00.0 , WWNN - 0x20000024ff2d1234, WWPN - 0x21000024ff2d1234 as could be seen from the below systool
command output.
# systool -c fc_host -v
Class = "fc_host"
Class Device = "host11"
Class Device path = "/sys/devices/pci0000:00/0000:00:09.0/0000:04:00.0/host11/fc_host/host11"
dev_loss_tmo = "45"
fabric_name = "0x10000005338fa33a"
issue_lip = <store method only>
max_npiv_vports = "254"
node_name = "0x20000024ff2d1234"
npiv_vports_inuse = "0"
port_id = "0x010200"
port_name = "0x21000024ff2d1234"
port_state = "Online"
port_type = "NPort (fabric via point-to-point)"
speed = "8 Gbit"
supported_classes = "Class 3"
supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
symbolic_name = "QLE2562 FW:v7.00.01 DVR:v8.05.00.03.06.5-k2"
system_hostname = ""
tgtid_bind_type = "wwpn (World Wide Port Name)"
uevent =
vport_create = <store method only>
vport_delete = <store method only>