Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
Couldn 't open PID file /var/run/named/named pid Permission denied
sendmail configuration on redhat
kernel 2 6 and /dev/sound/mixer not found
Promise 378 controller
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
Lotus Notes under Wine
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
/etc/security/limits conf question
Intel E/1000 driver
rpm database corrupt
Command stream end of file while reading
qla2300 modules
 
-none-

-none-

2007-08-21       - By Nikolas Lam

 Back
On Thu, 2007-08-02 at 18:02 +1000, Nikolas Lam wrote:
> Hi,
>
> I'm trying to find out ways of retrieving HBA identifying information
> from for Emulex and Qlogic cards on RHEL4 and RHEL5, preferably without
> having to install the vendor-provided drivers (in this case HP's package
> of lpfc and qla2xx).
>
> On RHEL4 with 2 single-channel Qlogic HBAs, I've found that the files
> in /proc/scsi/qla2xxx/* have everything I need:
>
> [nik@(protected) ~]$ grep -A 2 'SCSI Device Information:' /proc/scsi/qla2xxx/*
> /proc/scsi/qla2xxx/0:SCSI Device Information:
> /proc/scsi/qla2xxx/0-scsi-qla0-adapter-node=200000e08b9075e6;
> /proc/scsi/qla2xxx/0-scsi-qla0-adapter-port=210000e08b9075e6;
> --
> /proc/scsi/qla2xxx/1:SCSI Device Information:
> /proc/scsi/qla2xxx/1-scsi-qla1-adapter-node=200000e08b91ba01;
> /proc/scsi/qla2xxx/1-scsi-qla1-adapter-port=210000e08b91ba01;
>
> This concurs with the output of the adapter_info command that comes with
> the HP-supplied fibreutils RPM.
>
> [nik@(protected) ~]$ sudo adapter_info
> /proc/scsi/qla2xxx/1: STATE=READY WWNN=200000e08b91ba01
> WWPN=210000e08b91ba01
> /proc/scsi/qla2xxx/0: STATE=READY WWNN=200000e08b9075e6
> WWPN=210000e08b9075e6
>
>
> However, on RHEL4 with 2 single-channel Emulex HBAs, there appears to be
> a discrepancy between what is in /proc/scsi/lpfc/* and what adapter_info
> is telling me:
>
> [nik@(protected) ~]$ cat /proc/scsi/lpfc/0
> lpfc0t00 DID 6f0000 WWPN 50:00:1f:e1:50:02:f1:19 WWNN
> 50:00:1f:e1:50:02:f1:10
> lpfc0t01 DID 6f0100 WWPN 50:00:1f:e1:50:02:f1:1d WWNN
> 50:00:1f:e1:50:02:f1:10
> [nik@(protected) ~]$ cat /proc/scsi/lpfc/1
> lpfc1t00 DID 790000 WWPN 50:00:1f:e1:50:02:f1:1c WWNN
> 50:00:1f:e1:50:02:f1:10
> lpfc1t01 DID 790100 WWPN 50:00:1f:e1:50:02:f1:18 WWNN
> 50:00:1f:e1:50:02:f1:10
>
> [nik@(protected) ~]$ sudo adapter_info
> /sys/class/scsi_host/0: STATE=LINKUP WWNN=20000000c95e0709
> WWPN=10000000c95e0709
> /sys/class/scsi_host/1: STATE=LINKUP WWNN=20000000c9561b5b
> WWPN=10000000c9561b5b
>
> Firstly why is it that there appear to be 2 ports per lpfc device? There
> is only one port per card.
>
> Secondly, why does is there no apparent match between the WWNs output
> from /proc and adapter_info?
>
> Thirdly why are the WWNNs all the same in the /proc output?
>
>
>
> RHEL5 kernels seem to do things quite differently. It seems like the
> info is quite deep somewhere within /sys/class/fc_host/. What's a
> recommended method to retrieve this info on RHEL5? And would the method
> be consistent regardless of which vendor's HBA's card is being used?
>
> Thanks in advance,
>
> Nik
>
>
>

Thanks to Karl Heller who was able to point me in the right direction.
Here's summary of what I now know.

On RHEL4, for QLogic FC cards, to determine the WWPNs on the card, use
something like this:

grep -A 2 'SCSI Device Information:' /proc/scsi/qla2xxx/*

On RHEL4, with Emulex FC cards it's even easier:

cat /sys/class/scsi_host/host*/port_name

e.g.

[nik@(protected) ~]$ ls /sys/class/scsi_host/
host0  host1
[nik@(protected) ~]$
[nik@(protected) ~]$ cat /sys/class/scsi_host/host*/port_name
0x10000000c95e0709
0x10000000c9561b5b
[nik@(protected) ~]$

It seems that the stuff in /proc/scsi/lpfc/ (see my original email) actually
refers to the devices at the other end of the fibre. That's where the
discrepancy was coming from.

And it looks like RHEL5 has a consistent /proc filesystem regardless of what
vendor your card is from. Here's an example of retrieving WWPNs from RHEL5 host
with two dual-channel QLogic cards (four ports in total):

[root@(protected) ~]# cat /sys/class/fc_host/host*/port_name
0x50060b000063f0a8
0x50060b000063f0aa
0x50060b000063f1f0
0x50060b000063f1f2

I've no idea how the order of the ports is defined, although Karl thinks it will
at least be consistent. (N.B. obviously this doesn't mean that it will be
consistent between different versions of RHEL kernels).

Hope this is helpful to someone else.

Nik Lam

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list