Wednesday, March 31, 2010

Mounting a HP HSV300 SAN lun on Ubuntu linux

To get your HP HSV300 SAN luns mounted on linux over fiber channel, first use the HP GUI to set up your luns and present them to your host. On the host install 'multipath-tools'. You will probably see these lines in dmesg:
[    4.670129] qla2xxx 0000:0e:00.0: firmware: requesting ql2400_fw.bin
[    4.673089] qla2xxx 0000:0e:00.0: Firmware image unavailable.
[    4.673091] qla2xxx 0000:0e:00.0: Firmware images can be retrieved from: ftp://ftp.qlogic.com/outgoing/linux/firmware/.

Download the firmware from the QLogic server, and put it in '/lib/firmware'. Reload the kernel module:
rmmod qla2xxx
modprobe qla2xxx

You should get a whole lot of /dev/sd* devices created, I believe there is one for each lun times the number of paths to the storage. Put these lines in '/etc/multipath.conf':
defaults {
udev_dir        /dev
polling_interval    10
selector        "round-robin 0"
path_grouping_policy    failover
getuid_callout      "/lib/udev/scsi_id -g -u -d /dev/%n"
prio_callout        "/bin/true"
path_checker        tur
rr_min_io       100
rr_weight           uniform
failback        immediate
no_path_retry       12
user_friendly_names yes
bindings_file       "/var/lib/multipath/bindings"
}

devnode_blacklist {
devnode     "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode     "^hd[a-z][[0-9]*]"
devnode     "^cciss!c[0-9]d[0-9]*"
}

devices {
device {
vendor                  "HP"
product                 "HSV300"
path_grouping_policy    group_by_prio
getuid_callout          "/lib/udev/scsi_id -g -u -d /dev/%n"
path_checker            tur
path_selector           "round-robin 0"
prio_callout            "/sbin/mpath_prio_alua /dev/%n"
rr_weight               uniform
failback                immediate
hardware_handler        "0"
no_path_retry           18
rr_min_io               100
}
}


Restart the multipath service, and you should see your LUNs in /dev/mapper/mpath*

If you have just presented new LUNs, you might also need to reload the qla2xxx module as described above.

No comments: