The qla-autoconf script eases the configuration and deployement
of your QLogic qla2300 driver. It allows to do pattern based LUN
masking, specifying the failover path and making paths/LUNs visible
to the system.
By using the features of the QLogic qla2300 driver, you can manually
loadbalance LUNs over the different existing paths without having
all LUNs multiple times available to the system.
This program totally removes the need for the qlremote and graphical
MSJ client and allows to distribute the configuration to different
nodes that are using the same SAN storage.
- driver : either 'qla2200' or 'qla2300'
- pref : list of LUN preference mask for each path
- prio : list of priority ids for each path (for failover)
- visiblepaths : list of path-numbers to be visible
- wwns : list of WWNs with device name
[dag@emyn ~]# qla-autoconf -h
usage: qla-autoconf [-lwir] [-k version] [-n] [-o file] [-s] [-t dir]
-l, --list list configuration
-w, --write write configuration
-i, --initrd write and (re)create initrd, implies -w
-r, --reload write and reload modules, implies -w
-k, --kernel=ver use specified kernel version
-n, --numeric show World Wide Names (WWNs) instead of aliases
-o, --output=file specify file to save (default: /etc/qla2300.conf)
-s, --shorten use shorten output (driver v7)
-t, --test=dir test using proc-files in dir (no qlogic needed)
[dag@emyn ~]# qla-autoconf -l
IBM FAStT Host Bus Adapter 2x00 auto configuration:
Number of HBAs: 2
Number of paths per HBA: 8 Firmware: 3.03.01
Total number of paths: 16 Driver: 7.01.01-fo
Config 2/2 used for node emyn
Adapter 1/2 Node 1 HBA 1:
Path 1/16: Device IBM FAStT 600T 5 (lores) port A/2
^^^^ Visible (00) with failover priority 0, prefered bitmask: 0000..
Path 2/16: Device IBM FAStT 600T 5 (lores) port B/1
Hidden (80) with failover priority 2, prefered bitmask: aaaa..
Path 3/16: Device IBM FAStT 600T 2 (hires) port A/2
^^^^ Visible (00) with failover priority 0, prefered bitmask: 0000..
Path 4/16: Device IBM FAStT 600T 2 (hires) port B/1
Hidden (80) with failover priority 2, prefered bitmask: aaaa..
Path 5/16: Device IBM FAStT 600T 4 (lores) port A/2
Hidden (80) with failover priority 0, prefered bitmask: 0000..
Path 6/16: Device IBM FAStT 600T 4 (lores) port B/1
Hidden (80) with failover priority 2, prefered bitmask: aaaa..
Path 7/16: Device IBM FAStT 600T 3 (hires) port A/2
Hidden (80) with failover priority 0, prefered bitmask: 0000..
Path 8/16: Device IBM FAStT 600T 3 (hires) port B/1
Hidden (80) with failover priority 2, prefered bitmask: aaaa..
Adapter 2/2 Node 1 HBA 2:
Path 9/16: Device IBM FAStT 600T 5 (lores) port A/1
Hidden (80) with failover priority 3, prefered bitmask: 5555..
Path 10/16: Device IBM FAStT 600T 5 (lores) port B/2
Hidden (80) with failover priority 1, prefered bitmask: 0000..
Path 11/16: Device IBM FAStT 600T 2 (hires) port A/1
Hidden (80) with failover priority 3, prefered bitmask: 5555..
Path 12/16: Device IBM FAStT 600T 2 (hires) port B/2
Hidden (80) with failover priority 1, prefered bitmask: 0000..
Path 13/16: Device IBM FAStT 600T 4 (lores) port A/1
Hidden (80) with failover priority 3, prefered bitmask: 5555..
Path 14/16: Device IBM FAStT 600T 4 (lores) port B/2
^^^^ Visible (00) with failover priority 1, prefered bitmask: 0000..
Path 15/16: Device IBM FAStT 600T 3 (hires) port A/1
Hidden (80) with failover priority 3, prefered bitmask: 5555..
Path 16/16: Device IBM FAStT 600T 3 (hires) port B/2
^^^^ Visible (00) with failover priority 1, prefered bitmask: 0000..
When run as qla-autoconf -r, the following actions are taken:
- The proc-interface is scanned for available paths/devices
- A new configuration is being written to /etc/qla2300.conf
- A new qla2300_conf.o kernel module is being created using qla_opts
- A new initrd is being created as /boot/initrd-$(uname -r).img
- The current driver is unloaded
- The new driver and config is being loaded with the configured module parameters (not the ones from /etc/modules.conf)
Here are some common issues that people have reported:
- When using your own QLogic driver, people often are confused when Red Hat's driver is still being used. Please remove Red Hat's qlogic drivers prior to experimenting with your own. (rm -f /lib/modules/$(uname -r)/kernel/drivers/addon/*/qla2300*)
- Please copy the qla_opts utility that is build together with the driver, to /usr/local/sbin. qla-autoconf expects it there. I've had segmentation faults with the v6 qla_opts utility, so you may have to use the v7 one even when you're using the v6 driver.
- When using lilo, it may be necessary (and generally safe) to run lilo after running qla-autoconf -r, this is because your initrd may be using another inode than lilo thinks. If you don't do this, your system may not boot the next time.
- You should use the LINUX hosttype on the FAStT storage (AVT enabled), not the LNXCL hosttype. Failure to do so may have the FAStT report an incorrect number of LUNs or problems with LUNs.
- It's best to experiment with qla-autoconf with zoning disabled. Problems accessing LUNs over specific paths can occur if the zoning is incorrect.
Although it allows to do everything it was designed for, there are some
things I would love to implement if I have the time.
- Allow to choose from different predefined schemes and automatically execute
- Load the driver automatically (with a stub config or max_scsi_luns=0) if it's not already loaded (to prevent LUN transfers)
- Add sysv scripts to make boot-up and shutdown do special things (prepare next boot, etc...)
- Make the configuration external (not necessary, but may be handy nonetheless ?)
- Manage /etc/modules.conf and /etc/modprobe.conf options
- Add a Makefile, ChangeLog and SPEC file
- Make it work (better) with the v8 Qlogic driver and the 2.6 kernel changes (.ko extension, location of /proc, /sys)
The documentation and configuration is done inside the script. Several examples
are included in the tarball that allow you to experiment without having a Qlogic
device. Inside the script are several examples to show how you can configure it
for each of these cases.
Here's my current release. Let me know if you made any improvements.
A list of links to related materials
-
-
-
- explains some of the issues regarding Linux and the qla2300 driver
- (for Solaris driver only ?)
-
-