Why is the /proc/scsi/qla2xxx/ or /proc/scsi/lpfc/ directory missing in Red Hat Enterprise Linux 5 and what has replaced it?
Environment
- Red Hat Enterprise Linux 5
Issue
-
The 2.6.11 Linux kernel introduced certain changes to the
lpfc(emulex driver) andqla2xxx(Qlogic driver) Fibre Channel Host Bus Adapter (HBA) drivers which removed the following entries from theprocpseudo-filesystem:/proc/scsi/qla2xxx,/proc/scsi/lpfc. These entries had provided a centralized repository of information about the drivers and connected hardware. After the changes, the drivers started storing all this information within the/sysfilesystem. Since Red Hat Enterprise Linux 5 uses version 2.6.18 of the Linux kernel it is affected by this change. -
Using the
/sysfilesystem has the advantage that all the Fibre Channel drivers now use a unified and consistent manner to report data. However it also means that the data previously available in a single file is now scattered across a myriad of files in different parts of the/sysfilesystem. -
One basic example is the status of a Fibre Channel HBA: checking this can now be accomplished with the following command:
# cat /sys/class/scsi_host/host#/state
- ...where host# is the H-value in the HBTL SCSI addressing format, which references the appropriate Fibre Channel HBA. For emulex adapters (
lpfcdriver) for example, this command would yield:
# cat /sys/class/scsi_host/host1/state
Link Up - Ready:
Fabric
- For qlogic devices (
qla2xxxdriver) the output would instead be as follows:
# cat /sys/class/scsi_host/host1/state
Link Up - F_Port
Resolution
-
Obviously it becomes quite impractical to search through the
/sysfilesystem for the relevant files when there is a large variety of Fibre Channel-related information of interest. Instead of manual searching, thesystool(1) command provides a simple but powerful means of examining and analyzing this information. Detailed below are several commands which demonstrate samples of information which thesystoolcommand can be used to examine. -
To examine some simple information about the Fibre Channel HBAs in a machine:
# systool -c fc_host -v
- To look at verbose information regarding the SCSI adapters present on a system:
# systool -c scsi_host -v
- To see what Fibre Channel devices are connected to the Fibre Channel HBA cards:
# systool -c fc_remote_ports -v -d
- For Fibre Channel transport information:
# systool -c fc_transport -v
- For information on SCSI disks connected to a system:
# systool -c scsi_disk -v
- To examine more disk information including which hosts are connected to which disks:
# systool -b scsi -v
- Furthermore, by installing the sg3_utils package it is possible to use the sg_map command to view more information about the SCSI map. After installing the package, run:
# modprobe sg
# sg_map -x
- Finally, to obtain driver information, including version numbers and active parameters, the following commands can be used for the lpfc and qla2xxx drivers respectively:
# systool -m lpfc -v
# systool -m qla2xxx -v
- ATTENTION: The syntax of the systool (1) command differs across versions of Red Hat Enterprise Linux. Therefore the commands above are only valid for Red Hat Enterprise Linux 5.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.