Tuesday, September 9, 2014

Linux : How To Find Fiber Host Bus Adapter (Fiber HBA) WWN

# systool -c fc_host -v
Class = "fc_host"

  Class Device = "host1"
  Class Device path = "/sys/devices/pci0000:00/0000:00:1c.0/0000:0a:00.0/host1/fc_host/host1"
    dev_loss_tmo        = "16"
    fabric_name         = "0x2001000dec90e501"
    issue_lip           = <store method only>
    max_npiv_vports     = "254"
    node_name           = "0x5001438026697eaf"
    npiv_vports_inuse   = "0"
    port_id             = "0x2104c0"
    port_name           = "0x5001438026697eae" 
    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       = "HPAK344A FW:v7.01.00 DVR:v8.06.00.14.39.0-k1"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =
    vport_create        = <store method only>
    vport_delete        = <store method only>

    Device = "host1"
    Device path = "/sys/devices/pci0000:00/0000:00:1c.0/0000:0a:00.0/host1"
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          = <store method only>
      optrom              =
      reset               = <store method only>
      sfp                 = ""
      uevent              = "DEVTYPE=scsi_host"
      vpd                 = "▒&"


  Class Device = "host2"
  Class Device path = "/sys/devices/pci0000:20/0000:20:02.0/0000:27:00.0/host2/fc_host/host2"
    dev_loss_tmo        = "16"
    fabric_name         = "0x2001000dec90e501"
    issue_lip           = <store method only>
    max_npiv_vports     = "254"
    node_name           = "0x5001438026697e81"
    npiv_vports_inuse   = "0"
    port_id             = "0x210540"
    port_name           = "0x5001438026697e80"
    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       = "HPAK344A FW:v7.01.00 DVR:v8.06.00.14.39.0-k1"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =
    vport_create        = <store method only>
    vport_delete        = <store method only>

    Device = "host2"
    Device path = "/sys/devices/pci0000:20/0000:20:02.0/0000:27:00.0/host2"
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          = <store method only>
      optrom              =
      reset               = <store method only>
      sfp                 = ""
      uevent              = "DEVTYPE=scsi_host"
      vpd                 = "▒&"

# cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name
0x5001438026697eae
0x5001438026697e80


WWN – In Fibre Channel there’s a special term for a port identifier, specifically WWN or World Wide Name.  Just as every network card as a unique MAC address for each NIC port, every single FC port has a unique 64bit port WWN.  For example, a FC port WWN might look like this: 20:00:00:81:23:45:ac:01 and though I’ve used the colon (:) as a separator/delimiter it’s just as common to see the 16 hex digits separated by hyphens (-).
source : http://blog.osnexus.com/2012/03/20/understanding-fc-fabric-configuration-5-paragraphs/

On the VMs, it can be shown in the following path
# cat /sys/class/fc_host/host*/port_name
0x5001438000c4e0dc
0x5001438003ad4c84

# rpm -q -f /usr/bin/systool
sysfsutils-2.1.0-7.el6.x86_64


http://www.theunixway.com/2013/11/how-to-find-hba-and-add-new-lun-in.html

No comments:

Post a Comment