How to view the HBA cards in linux (redhat) (58922 Views)
Reply
Super Advisor
senthil_kumar_1
Posts: 901
Registered: ‎03-02-2009
Message 1 of 17 (58,922 Views)
Accepted Solution

How to view the HBA cards in linux (redhat)

Hi All,

Just now we have purchase on HP ProLiant DL 380 G6 and installed RHEL 5.3

It has 2 HBA Qlogic cards with two prots.

I am not able to see the Qlogic cards in linux.

I used following method to see:

# cd /proc/scsi

# ll -d qla2xxx

But here it showing nothing.

1)Do we need to install the driver for Qlogic?

2)If yes, how to install the driver and from where we can get the drivers?

3)If not, how to solve this?

Honored Contributor
Tim Nelson
Posts: 3,727
Registered: ‎06-01-2000
Message 2 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

lspci

drivers should already be in RHEL 5.3 (lsmod |grep qla) if not go get from qlogic ( I would at least get the qlogic utilities as they let you rescan and view the fabric)

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 3 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

First, can the card be detected on the system bus?

# lspci

If not, double-check that the card is properly inserted in the slot.

Second, has the default Qlogic driver been loaded successfully?

# lsmod | grep qla2xxx

If the driver has not auto-detected the card, you will probably need a newer version of the driver. If the card was purchased through HP, the driver should be available at http://www.hp.com/go/support as usual.


If the old /proc/scsi/qla2xxx exists but is empty, it might mean all the data has already been moved to /sys in that driver version.

In RHEL4 and older, each FC driver had its own way of reporting statistics and other information. There was no easily-scriptable way to e.g. find out the firmware version numbers of FC cards.

Then the Linux developers started to standardize the FC driver interface a bit. In RHEL 5, the work is still on-going, but you can expect to find the HBA information in two places:

- the FC-specific information should be available in virtual files at /sys/class/fc_host/host*/ directories (one for each FC port).

- the information that's applicable to any SCSI-like device should be available at /sys/class/scsi_host/host*/ directories.

The Emulex programmers seemed to get this wrong at first: the standard lpfc driver in RHEL 5.3 puts a lot of FC-specific parameters to /sys/class/scsi_host/host*/ directory, using custom lpfc_ -prefixed file names.

Once the interface becomes well-defined and stable, it will be possible to develop uniform tools, applicable to all FC cards, like "ifconfig" for NICs, or "fcmsutil" on HP-UX. Maybe in RHEL 6 or 7...

MK
MK
Honored Contributor
Jimmy Vance
Posts: 1,576
Registered: ‎11-27-2006
Message 4 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

RHEL 5.3 has moved everything to /sys

This package contains hp_rescan which will help you see the controllers

Linux Fibre Channel Enablement Kit for RHEL 5.3/5.4, SLES 10 SP3 and SLES 11

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?swItem=co-69719-3〈=en&cc=us&idx=0&mode=4&
Super Advisor
senthil_kumar_1
Posts: 901
Registered: ‎03-02-2009
Message 5 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

Hi All,

I am able to find the Qlogic HBA cards from my RHEL 5.3.

I have found that using following methods as you described above.

method 1: Cheked whether the qlogic is detected

#lspci

07:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
07:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
0a:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
0a:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)


1)So they are detected , am i correct?


method 2: Checked whether driver (modules) available for Qlogic:

# lsmod | grep qla2xxx
qla2xxx 1107173 0
scsi_transport_fc 73801 1 qla2xxx
scsi_mod 196569 9 scsi_dh,sr_mod,sg,usb_storage,qla2xxx,scsi_transport_fc,libata,cciss,sd_mod


2)So Qlogic drivers are available , am i correct?


method 3: Checked FC information in /sys

# cd /sys/class/scsi_host
ll
total 0
drwxr-xr-x 2 root root 0 Mar 23 06:25 host0
drwxr-xr-x 2 root root 0 Mar 23 06:25 host1
drwxr-xr-x 2 root root 0 Mar 23 06:25 host2
drwxr-xr-x 2 root root 0 Mar 23 06:25 host3
drwxr-xr-x 2 root root 0 Mar 23 06:25 host4
drwxr-xr-x 2 root root 0 Mar 23 06:25 host5

AND

# cd /sys/class/fc_host/
ll
total 0
drwxr-xr-x 3 root root 0 Mar 23 06:52 host2
drwxr-xr-x 3 root root 0 Mar 23 06:25 host3
drwxr-xr-x 3 root root 0 Mar 23 06:25 host4
drwxr-xr-x 3 root root 0 Mar 23 06:25 host5


3) So I believe host2, host3, host4 and host5 are Qlogic FC and host0 & host1 are local SCSI ports available in mother board, Am I correct?

4)So as per above outputs my Qlogic FC card has been detected and I can use them in SAN network with out installing any drivers further, am i correct?

5)The purpose of "Fibre Channel Enablement Kit" is to see available FC controllers and rescan the FC controller to check for new LUNs with out restarting the linux, am i correct?

Please answer to my questions one by one.

Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 6 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

Hi

The way I learned, because lspci didn't always work, was to go through the /proc/pci directory and find the HBA device there. For qlogic, you need to know the model ahead of time and the look for it. I.e., '...qla###.."

cd /proc/pci
ls | grep -i "*qla*"
Support Fatherhood - Stop Family Law
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 7 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

lspci

Why are you using a pci bus command successfully to find the qlogic devices, but then use a SCSI command to fail to find them?

A pci device isn't going to be on a SCSI bus.
Support Fatherhood - Stop Family Law
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 8 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

Shalom,

These hba cards act like scsi cards, as in they provide disk in a format that the OS understands.

Clearly above, method 1 does appear to work.

The drivers are build into the OS for these HBA's however full functionality with HP tools did not work for me without installation of PSP.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 9 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

SEP

Really?

(* Still learning. *)
Support Fatherhood - Stop Family Law
Super Advisor
senthil_kumar_1
Posts: 901
Registered: ‎03-02-2009
Message 10 of 17 (58,922 Views)

Re: How to view the HBA cards in linux (redhat)

Hi All,

Could you please answer to my questions one by one so that it will be very useful to me?


Hi Michael Steele,

I am not able to cd in to /proc/pci.

I believe the directory "/proc/pci" is not available.


Hi Steven E. Protter,

I have downloaded HP Fibre Channel Enablement Kit.

1)Are you saying that we need to install PSP even after installing HP Fibre Channel Enablement Kit to work the full functionality of HP tools in linux?

2)what is PSP?

3)Where we can download PSP from?
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 11 of 17 (58,907 Views)

Re: How to view the HBA cards in linux (redhat)

Hi

This was the correction that SEP was pointing out to me. 'lspci' as a command, /proc/scsi/ to check the kernel. I.e.,

HBA is a QLogic with model # qla#####

In /proc/scsi you would check for ...

cat /proc/scsi/qla#####
Support Fatherhood - Stop Family Law
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 12 of 17 (58,907 Views)

Re: How to view the HBA cards in linux (redhat)

Michael: As was already mentioned, in RHEL 5 the FC information has been moved to /sys filesystem, and /proc/scsi/qla2xxx contains so little information that it's useless.

senthil_kumar:
1) Yes, the cards can be detected on the bus, so the physical connection is fine.

2) Yes, the qla2xxx driver has automatically been loaded and is using the various SCSI-layer service modules. Looks good.

> 3) So I believe host2, host3, host4 and host5 are Qlogic FC and host0 & host1 are local SCSI ports available in mother board, Am I correct?

Yes, that's true.

Both /sys/class/fc_host/hostX and the equivalent /sys/class/scsi_host/hostX refer to the same FC port.

> 4)So as per above outputs my Qlogic FC card has been detected and I can use them in SAN network with out installing any drivers further, am i correct?

Yes, looks like it.

> 5)The purpose of "Fibre Channel Enablement Kit" is to see available FC controllers and rescan the FC controller to check for new LUNs with out restarting the linux, am i correct?

Yes... but rescanning the controllers is possible even without the Fibre Channel Enablement Kit, but the procedure is slightly more difficult.

See RedHat Online Storage Reconfiguration Guide:

https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/html/Online_Storage_Reconfiguration_Guide...

MK
MK
Super Advisor
senthil_kumar_1
Posts: 901
Registered: ‎03-02-2009
Message 13 of 17 (58,907 Views)

Re: How to view the HBA cards in linux (redhat)

Hi Michael Steele,

Please refer Jimmy Vance's post.
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 14 of 17 (58,907 Views)

Re: How to view the HBA cards in linux (redhat)

Thanks!
(still learning how to be a hobbyist :-) *)
Support Fatherhood - Stop Family Law
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 15 of 17 (58,907 Views)

Re: How to view the HBA cards in linux (redhat)

Shalom again Sentil,

PSP
Proliant Service Pack

It is a set of tools available for Proliant Servers that make managing the systems, especially fiber attached storage much easier.

There are web based tools, even disk partitioning tools that are a system administrators friend.

On certain Proliant systems with qlogic cards, I have had to install PSP to insure stable access to HBA/Fiber attached storage.

Sorry, I though using G6 servers you knew about PSP. My bad. No points for me please.

SEP
22 Points to Linux Olympus with a penguin on top.

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Occasional Collector
hari07
Posts: 3
Registered: ‎02-08-2013
Message 16 of 17 (50,094 Views)

Re: TO FIND HBA FIRMWARE VERSION SEE BELOW

2. systool -c scsi_host -v gives the serial number (if available), firmware, and other information of HBAs. For example:

# systool -c scsi_host -v
Class = “scsi_host”

Class Device = “host0″
Class Device path = “/sys/class/scsi_host/host0″
84xx_fw_version = “”
beacon = “Disabled”
cmd_per_lun = “3″
driver_version = “8.03.01.04.05.05-k”
fabric_param = “1280″
flash_block_size = “0×10000″
fw_state = “0×3 0×3 0xb100 0×0 0×4″
fw_version = “4.04.09 (85)”
host_busy = “0″
isp_id = “0000 0000 0000 0000″
isp_name = “ISP2532″
max_npiv_vports = “255″
model_desc = “HP 8Gb Single Channel PCI-e 2.0 FC HBA”
model_name = “HPAK344A”
mpi_version = “”
npiv_vports_inuse = “0″
optrom_bios_version = “2.12″
optrom_efi_version = “2.05″
optrom_fcode_version= “2.03″
optrom_fw_version = “4.04.04 128″
pci_info = “PCIe (5.0Gb/s x4)”
phy_version = “”
proc_name = “”
scan =
serial_num = “”
sg_tablesize = “255″
state = “Link Up – F_Port”
total_isp_aborts = “0″
uevent =
unchecked_isa_dma = “0″
unique_id = “0″
vlan_id = “”
vn_port_mac_address = “”
vport_create =
vport_delete =
zio_timer = “200 us”
zio = “Disabled”

 

ref : http://www.doxer.org/learn-linux/resolved-linux-check-qlogicemulex-hba-firmware-version-and-model-na...

Occasional Visitor
Dinakar16
Posts: 1
Registered: ‎05-27-2014
Message 17 of 17 (19,838 Views)

Re: TO FIND HBA FIRMWARE VERSION SEE BELOW

hi,

 

Try below command

 

#dmesg | grep -i fibre

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.