Linux Storage - systool fc_host
Linux Storage Solution · Config document · referenced from Linux HBA and SCSI inventory
The systool command set over the fc_host class on HV01: seven runs of systool -c fc_host -A <attribute>, which print one attribute for both HBA ports at once, and the full systool -c fc_host -v, which prints every attribute of both ports. systool reads the same sysfs attributes as the cat commands in HBA sysfs attributes, only formatted and for every port in one go. Everything ran as root on HV01 and reads only.
| Item | Value |
|---|---|
| Class | fc_host, the class devices host1 and host2 under /sys/class/fc_host/ |
| On which host | HV01, the first blade (HP BL660c Gen8) |
| Run as | root |
| Tool | systool from the sysfsutils package; the notes do not give its version |
| HBA | QLogic QMH2572, PCI functions 0000:03:00.0 (host1) and 0000:03:00.1 (host2), driver qla2xxx 8.05.00.03.55.6-k, firmware 5.09.00 |
The commands
The state of both ports.
$ systool -c fc_host -A port_stateoutput 7 lines
Class = "fc_host"
Class Device = "host1"
port_state = "Online"
Device = "host1"
Class Device = "host2"
port_state = "Online"
Device = "host2"The type of both ports.
$ systool -c fc_host -A port_typeoutput 7 lines
Class = "fc_host"
Class Device = "host1"
port_type = "NPort (fabric via point-to-point)"
Device = "host1"
Class Device = "host2"
port_type = "NPort (fabric via point-to-point)"
Device = "host2"The addresses of both FC ports. The author's note beside it gives the colon form: 0x50014380123456c0 is 50:01:43:80:12:34:56:c0.
$ systool -c fc_host -A port_nameoutput 7 lines
Class = "fc_host"
Class Device = "host1"
port_name = "0x50014380123456c0"
Device = "host1"
Class Device = "host2"
port_name = "0x50014380123456c2"
Device = "host2"The speed of both ports.
$ systool -c fc_host -A speedoutput 7 lines
Class = "fc_host"
Class Device = "host1"
speed = "8 Gbit"
Device = "host1"
Class Device = "host2"
speed = "8 Gbit"
Device = "host2"The FC classes both ports support.
$ systool -c fc_host -A supported_classesoutput 7 lines
Class = "fc_host"
Class Device = "host1"
supported_classes = "Class 3"
Device = "host1"
Class Device = "host2"
supported_classes = "Class 3"
Device = "host2"The speeds both ports support.
$ systool -c fc_host -A supported_speedsoutput 7 lines
Class = "fc_host"
Class Device = "host1"
supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
Device = "host1"
Class Device = "host2"
supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
Device = "host2"The card type and firmware version of both ports.
$ systool -c fc_host -A symbolic_nameoutput 7 lines
Class = "fc_host"
Class Device = "host1"
symbolic_name = "QMH2572 FW:v5.09.00 DVR:v8.05.00.03.55.6-k"
Device = "host1"
Class Device = "host2"
symbolic_name = "QMH2572 FW:v5.09.00 DVR:v8.05.00.03.55.6-k"
Device = "host2"The full listing
Every attribute of both FC hosts. This is the second of the three examples at the end of the notes, the one the section on the HBA refers to for the details.
$ systool -c fc_host -voutput 67 lines
Class = "fc_host"
Class Device = "host1"
Class Device path = "/sys/class/fc_host/host1"
fabric_name = "0x200b547feeabcd19"
issue_lip = <store method only>
max_npiv_vports = "254"
node_name = "0x50014380123456c1"
npiv_vports_inuse = "0"
port_id = "0x2a0000"
port_name = "0x50014380123456c0"
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 = "QMH2572 FW:v5.09.00 DVR:v8.05.00.03.55.6-k"
system_hostname = ""
tgtid_bind_type = "wwpn (World Wide Port Name)"
uevent = "PHYSDEVPATH=/devices/pci0000:00/0000:00:02.0/0000:03:00.0
PHYSDEVBUS=pci
PHYSDEVDRIVER=qla2xxx"
vport_create = <store method only>
vport_delete = <store method only>
Device = "host1"
Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/host1"
fw_dump =
nvram = "ISP "
optrom =
optrom_ctl = <store method only>
reset = <store method only>
uevent =
vpd = "-="
Class Device = "host2"
Class Device path = "/sys/class/fc_host/host2"
fabric_name = "0x2015547feeabcef1"
issue_lip = <store method only>
max_npiv_vports = "254"
node_name = "0x50014380123456c3"
npiv_vports_inuse = "0"
port_id = "0x580100"
port_name = "0x50014380123456c2"
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 = "QMH2572 FW:v5.09.00 DVR:v8.05.00.03.55.6-k"
system_hostname = ""
tgtid_bind_type = "wwpn (World Wide Port Name)"
uevent = "PHYSDEVPATH=/devices/pci0000:00/0000:00:02.0/0000:03:00.1
PHYSDEVBUS=pci
PHYSDEVDRIVER=qla2xxx"
vport_create = <store method only>
vport_delete = <store method only>
Device = "host2"
Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/host2"
fw_dump =
nvram = "ISP "
optrom =
optrom_ctl = <store method only>
reset = <store method only>
uevent =
vpd = "-="The attributes
The attributes that the cat series did not read, and the two ports side by side. The rest is explained in HBA sysfs attributes.
| Attribute | host1 | host2 | What it tells |
|---|---|---|---|
fabric_name | 0x200b547feeabcd19 | 0x2015547feeabcef1 | the WWN of the fabric the port logged into; the two ports are in two different fabrics, SW1 and SW2. The third and fourth hex digits read 0b and 15, that is 11 and 21, which are the VSAN numbers of the schema; that the VSAN is encoded there is my inference, the notes do not say it |
node_name | 0x50014380123456c1 | 0x50014380123456c3 | the World Wide Node Name (WWNN) of the port's node, the second name the switch's flogi database lists next to the port name |
port_id | 0x2a0000 | 0x580100 | the FCID the fabric assigned at login; 0x2a0000 is the FCID of bay1 in VSAN 11 in the switch's flogi database |
port_name | 0x50014380123456c0 | 0x50014380123456c2 | the WWPN, the identity the zoning works with |
tgtid_bind_type | wwpn (World Wide Port Name) | the same | SCSI target IDs are bound to the WWPN of the remote port, so a target keeps its ID across reboots as long as the array port keeps its WWPN; the binding types are my understanding of the FC transport class |
max_npiv_vports, npiv_vports_inuse | 254, 0 | the same | the port could create up to 254 NPIV virtual ports and none is in use |
system_hostname | empty | empty | a hostname the host may register with the fabric; nothing was set |
issue_lip, vport_create, vport_delete, optrom_ctl, reset | <store method only> | the same | write-only attributes: writing to them triggers an action (a loop initialisation, creating or deleting a virtual port, a reset) and they have nothing to read |
fw_dump, optrom, uevent of the device | empty | empty | the firmware dump and option ROM are empty, and the uevent of the PCI device prints nothing in this listing |
nvram, vpd | ISP , -= | the same | binary attributes that systool prints as the first readable bytes; they carry nothing a reader can use here |
The uevent of the class device spans three lines inside one pair of quotes: systool prints the value as it is, with the embedded newlines.
Checked against sysfsutils 2.1.1, Linux 7.2 and RHEL 10.2
| As built | Today |
|---|---|
systool from sysfsutils | Still packaged (sysfsutils 2.1.1 in the RHEL AppStream repositories and in SLES 16.0, 2.1.0 in SLES 15 SP7), but upstream has been dormant since August 2022 with v2.1.1 as its last tag, and neither the RHEL 7 to 10 storage guides nor the SLES 15 SP7 Storage Administration Guide mention it; they read the sysfs files with cat and use lsscsi, lsblk and multipath -ll |
the fc_host attributes in the listing | All still defined by the FC transport class under the same names, fabric_name, tgtid_bind_type, max_npiv_vports, npiv_vports_inuse, vport_create, vport_delete, issue_lip and system_hostname included |
tgtid_bind_type wwpn (World Wide Port Name) | Still the default binding of the FC transport class |
issue_lip as a store method | Still there; the RHEL 10 guide describes it as "Instructs the driver to rediscover remote ports" |
NPIV, max_npiv_vports 254 | Still part of the FC transport class; of interest today mostly for per-VM virtual ports and for NPV/NPIV uplinks on the switches |
The listing itself would look the same today, with a longer attribute list; the tool that produced it is the part that has gone quiet.