How to check Word Wide Node (WWN) for Fiber Channel HBA card?

To find the Fibre Channel addresses of the HBAs on the machine, run the following:

# systool -c fc_host -v
   
    (output trimmed for clarity)
   
      Class Device path = "/sys/class/fc_host/host8"  (kernel assigned host name/number)
        node_name           = "0x20000024ff2254bf"    (hba wwnn       )
        port_name           = "0x21000024ff2254bf"    (hba wwpn       )
        port_id             = "0x030b00"              (fabric port id assigned by the san to this HBA)

      Class Device path = "/sys/class/fc_host/host9"
        node_name           = "0x20000024ff2254be"
        port_name           = "0x21000024ff2254be"
        port_id             = "0x010c00"

or alternatively

# ls -1c /sys/class/fc_host/host*/*_name 2> /dev/null | xargs -I {} grep -H -v "ZzZz" {} | sort
    /sys/class/fc_host/host8/fabric_name:0x100000053367f20d
    /sys/class/fc_host/host8/node_name:0x20000024ff2254bf
    /sys/class/fc_host/host8/port_name:0x21000024ff2254bf
    /sys/class/fc_host/host8/symbolic_name:QLE2562 FW:v5.06.02 DVR:v8.04.00.04.06.3-k
    /sys/class/fc_host/host9/fabric_name:0x100000606951c582
    /sys/class/fc_host/host9/node_name:0x20000024ff2254be
    /sys/class/fc_host/host9/port_name:0x21000024ff2254be
    /sys/class/fc_host/host9/symbolic_name:QLE2562 FW:v5.06.02 DVR:v8.04.00.04.06.3-k


    # ls -1c /sys/class/fc_host/host*/port_id 2> /dev/null | xargs -I {} grep -H -v "ZzZz" {} | sort
    /sys/class/fc_host/host8/port_id:0x030b00
    /sys/class/fc_host/host9/port_id:0x010c00

No comments: