Installing QLogic drivers on CentOS Linux hosts

I have a couple of hosts in my lab with QLA2342 HBAs, and use the drivers from QLogic instead of the drivers that come with the kernel. There are a number of reasons for this, but I’ll save that explanation for a future post. To install the QLogic drivers on a CentOS 5.3 host, you will first need to download the qlafc package from QLogic’s website. Once you retrieve the bits, you can run the qlinstall utility to build and install a qlaXxxx driver that works with the kernel you are running:

$ tar xfvz qlafc-linux-8.02.14.01-1-install.tgz

$ cd qlafc-linux-8.02.14.01-1-install

$ ls -la

total 11772
drwxr-xr-x 4 root  root     4096 Jul 10  2008 .
drwx------ 3 matty matty    4096 Apr 30 07:45 ..
drwxr-xr-x 4 root  root     4096 Jul 10  2008 agents
drwxr-xr-x 7 root  root     4096 Apr 30 07:47 LinuxTools
-rw-r--r-- 1 root  root  2376930 Jul 10  2008 qla2xxx-v8.02.14.01-1.noarch.rpm
-rwxr-xr-x 1 root  root   146155 Jul 10  2008 qlinstall
-rw-r--r-- 1 root  root     7321 Jul 10  2008 ql-pci.ids
-rw-r--r-- 1 root  root    14119 Jul 10  2008 README.qlinstall.txt
-rw-r--r-- 1 root  root  2905583 Jul 10  2008 scli-1.7.1-23.i386.rpm
-rw-r--r-- 1 root  root  3736548 Jul 10  2008 scli-1.7.1-23.ia64.rpm
-rw-r--r-- 1 root  root  2792038 Jul 10  2008 scli-1.7.1-23.ppc64.rpm
-rwxr-xr-x 1 root  root    18465 Jul 10  2008 set_driver_param



$ ./qlinstall

#*********************************************************#
#           SANsurfer Driver Installer for Linux          #
#             Installer Version:  1.01.00pre21 	   	  #
#*********************************************************#

Kernel version: 2.6.18-128.1.6.el5
Distribution: CentOS release 5.3 (Final)

Found following QLogic Adapter in the system
    1. QLA2342
Installation will begin for following driver
    1. qla2xxx version: v8.02.14.01


Unloading any loaded drivers
Unloaded module qla2xxx

Installing Driver...
Preparing...                ##################################################
qla2xxx                     ##################################################

QLA2XXX -- Building the qla2xxx driver, please wait...
Installing intermodule.ko in /lib/modules/2.6.18-128.1.6.el5/kernel/kernel/
 


QLA2XXX -- Installing the qla2xxx modules to 
/lib/modules/2.6.18-128.1.6.el5/kernel/drivers/scsi/qla2xxx/...

Setting up QLogic HBA API library...
Please make sure the /usr/lib/libqlsdm.so file is not in use.
Installing 32bit api binary for x86_64.
Installing 64bit api binary for x86_64.
Library 4.00 build12 already installed at /usr/lib/libqlsdm.so.
Done.

Loading module qla2xxx_conf version: v8.02.14.01....
Loaded module qla2xxx_conf
Loading module qla2xxx version: v8.02.14.01....
Loaded module qla2xxx


Building default persistent binding using SCLI
 
Saved copy of /etc/modprobe.conf as
/usr/src/qlogic/v8.02.14.01-1/backup/modprobe.conf-2.6.18-128.1.6.el5-043009-082949.bak

Saved copy of /boot/initrd-2.6.18-128.1.6.el5.img as
/boot/initrd-2.6.18-128.1.6.el5_QLI.org
QLA2XXX -- Rebuilding ramdisk image...
Ramdisk created.

Reloading the QLogic FC HBA drivers....
Unloaded module qla2xxx
Loading module qla2xxx_conf version: v8.02.14.01....
Loaded module qla2xxx_conf
Loading module qla2xxx version: v8.02.14.01....
Loaded module qla2xxx


Target Information on all HBAs:
==============================
 --------------------------------------------------------------------------------
HBA Instance 0: QLA2342 Port 1 WWPN 21-00-00-1B-32-04-86-C3 PortID 01-12-00
--------------------------------------------------------------------------------
No device connected to selected HBA (Instance 0)!
--------------------------------------------------------------------------------
HBA Instance 1: QLA2342 Port 2 WWPN 21-01-00-1B-32-24-86-C3 PortID 01-13-00
--------------------------------------------------------------------------------
No device connected to selected HBA (Instance 1)!
Installing the qlinstall-autoload script in /etc/init.d/ 

#*********************************************************#
#               INSTALLATION SUCCESSFUL!!                 #
#    SANsurfer Driver installation for Linux completed    #
#*********************************************************#



Once the driver is installed and loaded, you can verify the version by running the modinfo utility:

$ modinfo qla2xxx | head -10

filename:       /lib/modules/2.6.18-128.1.6.el5/kernel/drivers/scsi/qla2xxx/qla2xxx.ko
version:        8.02.14.01
license:        GPL
description:    QLogic Fibre Channel HBA Driver
author:         QLogic Corporation
srcversion:     90F727BC62E8CB20433AB36
alias:          pci:v00001077d00002532sv*sd*bc*sc*i*
alias:          pci:v00001077d00005432sv*sd*bc*sc*i*
alias:          pci:v00001077d00005422sv*sd*bc*sc*i*
alias:          pci:v00001077d00008432sv*sd*bc*sc*i*



QLogic includes a number of nifty utilities with their driver bundle, all of which I plan to blog about in future posts.