Thursday, January 6, 2011

Everything you wanted to know about your HBA but were afraid to ask!!!

Well, as usual I was provided with a remote access to our lab machines at the beginning of the project, but needed to collect a whole lot of information about the server during the course of the project.

One such piece of information was about the HBA on the RedHat Linux box that I was working on.

You can find all the information you need about the HBA under /sys/class/fc_host
[root@isvx7 host5]# pwd
/sys/class/fc_host

[root@isvx7 fc_host]# ls
host5  host6

[root@isvx7 host5]# ls
device       port_id     speed              supported_speeds  uevent
fabric_name  port_name   statistics         symbolic_name
issue_lip    port_state  subsystem          system_hostname
node_name    port_type   supported_classes  tgtid_bind_type
[root@isvx7 host5]# cat speed
8 Gbit

[root@isvx7 host5]# cat supported_speeds
1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit

[root@isvx7 host5]# lspci |grep -i -e fib -e hba
15:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
15:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
[root@isvx7 host5]#


[root@isvx7 proc]# systool -c fc_host -v
Class = "fc_host"

Class Device = "host5"
Class Device path = "/sys/class/fc_host/host5"
fabric_name         = "0x100000051ef510a4"
issue_lip           = 
node_name           = "0x20000024ff21d2ee"
port_id             = "0x020200"
port_name           = "0x21000024ff21d2ee"
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       = "QLE2562 FW:v5.03.02 DVR:v8.03.01.04.05.05-k"
system_hostname     = ""
tgtid_bind_type     = "wwpn (World Wide Port Name)"
uevent              = 

Device = "host5"
Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host5"
ct                  =
edc                 = 
els                 =
fw_dump             =
nvram               = "ISP "
optrom_ctl          = 
optrom              =
reset               = 
sfp                 = ""
uevent              = 
vpd                 = "("


Class Device = "host6"
Class Device path = "/sys/class/fc_host/host6"
fabric_name         = "0x10000005331842a7"
issue_lip           = 
node_name           = "0x20000024ff21d2ef"
port_id             = "0x020200"
port_name           = "0x21000024ff21d2ef"
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       = "QLE2562 FW:v5.03.02 DVR:v8.03.01.04.05.05-k"
system_hostname     = ""
tgtid_bind_type     = "wwpn (World Wide Port Name)"
uevent              = 

Device = "host6"
Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.1/host6"
ct                  =
edc                 = 
els                 =
fw_dump             =
nvram               = "ISP "
optrom_ctl          = 
optrom              =
reset               = 
sfp                 = ""
uevent              = 
vpd                 = "("


[root@isvx7 proc]#

2 comments:

PrasannaKumari said...

1)Is there any place where i can find out what each field in the /sys/devices/fc_host/host directory means.

My requirement is to identify if two HBA ports belong to the same HBA. Is there any way to find this out.


2) Also, is there any command that can be run on the Linux host both RHEL and SuSE to refresh the disk entries in /sys/devices/scsi_disk directory once some LUNs or external storage is unpresented.

Retaining Wall Contractor Baldwin Park said...

This iss a great post thanks