Operating System - Linux
1748151 Members
3624 Online
108758 Solutions
New Discussion юеВ

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

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

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?

16 REPLIES 16
Tim Nelson
Honored Contributor

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)

Matti_Kurkela
Honored Contributor
Solution

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 https://support.hpe.com/hpesc/public/home  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

[Note: broken link removed by Mod]

MK
Jimmy Vance
HPE Pro

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

https://access.redhat.com/solutions/528683

[Note: broken link removed by Mod]

No support by private messages. Please ask the forum! 
senthil_kumar_1
Super Advisor

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.

Michael Steele_2
Honored Contributor

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
Michael Steele_2
Honored Contributor

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
Steven E. Protter
Exalted Contributor

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
Michael Steele_2
Honored Contributor

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

SEP

Really?

(* Still learning. *)
Support Fatherhood - Stop Family Law
senthil_kumar_1
Super Advisor

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?