LINUXOR.SK ... open source notes ...

Linux Storage - systool fc_host

category: solutionz · date: 2013-12-31 · updated: 2026-10-03 · author: LALA

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.

ItemValue
Classfc_host, the class devices host1 and host2 under /sys/class/fc_host/
On which hostHV01, the first blade (HP BL660c Gen8)
Run asroot
Toolsystool from the sysfsutils package; the notes do not give its version
HBAQLogic 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.

bash
$ systool -c fc_host -A port_state
output 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.

bash
$ systool -c fc_host -A port_type
output 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.

bash
$ systool -c fc_host -A port_name
output 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.

bash
$ systool -c fc_host -A speed
output 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.

bash
$ systool -c fc_host -A supported_classes
output 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.

bash
$ systool -c fc_host -A supported_speeds
output 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.

bash
$ systool -c fc_host -A symbolic_name
output 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.

bash
$ systool -c fc_host -v
output 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.

Attributehost1host2What it tells
fabric_name0x200b547feeabcd190x2015547feeabcef1the 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_name0x50014380123456c10x50014380123456c3the 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_id0x2a00000x580100the FCID the fabric assigned at login; 0x2a0000 is the FCID of bay1 in VSAN 11 in the switch's flogi database
port_name0x50014380123456c00x50014380123456c2the WWPN, the identity the zoning works with
tgtid_bind_typewwpn (World Wide Port Name)the sameSCSI 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_inuse254, 0the samethe port could create up to 254 NPIV virtual ports and none is in use
system_hostnameemptyemptya hostname the host may register with the fabric; nothing was set
issue_lip, vport_create, vport_delete, optrom_ctl, reset<store method only>the samewrite-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 deviceemptyemptythe firmware dump and option ROM are empty, and the uevent of the PCI device prints nothing in this listing
nvram, vpdISP , -=the samebinary 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 builtToday
systool from sysfsutilsStill 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 listingAll 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 methodStill there; the RHEL 10 guide describes it as "Instructs the driver to rediscover remote ports"
NPIV, max_npiv_vports 254Still 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.

← solutionz