Advertisements

Checking WWPN for a Linux host

Here is a dual port HBA

root@linux:~ # lspci | grep -i fibre
06:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02)
06:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02)

Verifying the WWPN from the HBA

root@linux:~ # cat /sys/class/scsi_host/host0/device/fc_host\:host0/port_name
0x10000000c99f46b4
root@linux:~ # cat /sys/class/scsi_host/host1/device/fc_host\:host1/port_name
0x10000000c99f46b5

The WWPN show above is:
10:00:00:00:c9:9f:46:b4
10:00:00:00:c9:9f:46:b5

Or you can use systool instead of messing with /proc

root@linux:~ # systool -av -c fc_host
Class = “fc_host”

Class Device = “host0”
Class Device path = “/sys/class/fc_host/host0”
active_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
fabric_name = “0x100000051ef61a00”
issue_lip =
maxframe_size = “2048 bytes”
node_name = “0x20000000c99f46b4”
port_id = “0x648acd”
port_name = “0x10000000c99f46b4”
port_state = “Online”
port_type = “NPort (fabric via point-to-point)”
speed = “4 Gbit”
supported_classes = “Class 3”
supported_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
supported_speeds = “1 Gbit, 2 Gbit, 4 Gbit”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host0”
Device path = “/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.0/host0”
uevent =

Class Device = “host1”
Class Device path = “/sys/class/fc_host/host1”
active_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
fabric_name = “0x1000000533021c00”
issue_lip =
maxframe_size = “2048 bytes”
node_name = “0x20000000c99f46b5”
port_id = “0xc88ac5”
port_name = “0x10000000c99f46b5”
port_state = “Online”
port_type = “NPort (fabric via point-to-point)”
speed = “4 Gbit”
supported_classes = “Class 3”
supported_fc4s = “0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ”
supported_speeds = “1 Gbit, 2 Gbit, 4 Gbit”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host1”
Device path = “/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.1/host1”
uevent =

Advertisements
%d bloggers like this: