Wednesday, 20 May 2009

Load balance and failover in Red Hat with qla driver

OS Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
HBA Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)

download and install driver hp_qla2x00src-8.01.03p4-20b
backup your initrd files under /boot directory.

# cat /proc/scsi/qla2xxx/0
# cat /proc/scsi/qla2xxx/1

See your LUNs there under "SCSI LUN Information:"
SCSI LUN Information:
(Id:Lun) * - indicates lun is not registered with the OS.
( 0: 0): Total reqs 3, Pending reqs 0, flags 0x0*, 1:0:81 00
( 0: 1): Total reqs 58, Pending reqs 0, flags 0x0, 1:0:81 00

cd /opt/hp/src/hp_qla2x00src/
# ./set_parm
Choice: 1
Writing new /etc/hp_qla2x00.conf...done
adding line to /etc/modprobe.conf: alias scsi_hostadapter1 qla2xxx_conf
adding line to /etc/modprobe.conf: alias scsi_hostadapter2 qla2xxx
adding line to /etc/modprobe.conf: alias scsi_hostadapter3 qla2300
adding line to /etc/modprobe.conf: alias scsi_hostadapter4 qla2400
adding line to /etc/modprobe.conf: alias scsi_hostadapter5 qla6312
adding line to /etc/modprobe.conf: options qla2xxx ql2xmaxqdepth=16 qlport_down_retry=30 ql2xloginretrycount=16 ql2xfailover=1 ql2xlbType=1 ql2xautorestore=0x80

Would you like to create a new initrd to reflect the changes in the parameters (Y/n)? Y
Creating new initrd - initrd-2.6.9-55.0.2.ELsmp.img

---Press ENTER to continue---

reboot server.

If you want to be sure disconnect fiber cables and test failover. You will see dmesg output like below

qla2300 0000:42:01.0: LOOP DOWN detected (2).
qla2x00: FAILOVER device 0 from wwn-> wwn- LUN 01, reason=0x2
qla2x00: FROM HBA 0 to HBA 1
qla2300 0000:42:01.0: LIP reset occured (f700).
qla2300 0000:42:01.0: LOOP UP detected (2 Gbps).
scsi(0) :Loop id 0x0081 is an XP device
qla2x00: FAILBACK device 0 -> wwn LUN 01
qla2x00: FROM HBA 1 to HBA 0


Anonymous said...


I need to identified actual qla driver : hp, RedHat or GLogic ?

cat /proc/scsi/qla2xxx/0 :
QLogic PCI to Fibre Channel Host Adapter for QLA2312:
Firmware version 3.03.20 IPX, Driver version 8.01.04-d7-debug

HP support says it's a RedHat driver and RedHat support says it's a HP driver...


PS : my RedHat doesn't view all luns (i need to launch a hp_rescan after reboot)

Tlepsh said...

I do not know exactly identify which driver is installed.

If Hp driver is installed, it has changed your /boot/grub/grub.conf file with HP tag in it.

But I had same problem, Red Hat drivers were not detecting luns. So I installed HP version which I downloaded from HP site.

Also there could be a problem related to cciss drivers check this