Bug 475967

Summary: multipath should search for "hp-sw" hardware handler, not for "hp_sw"
Product: Red Hat Enterprise Linux 5 Reporter: Konstantin Khorenko <khorenko>
Component: device-mapper-multipathAssignee: Ben Marzinski <bmarzins>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2CC: agk, bdonahue, bmarzins, bmr, christophe.varoqui, dwysocha, edamato, egoggin, heinzm, junichi.nomura, kueda, lmb, mbroz, mnovacek, prockai, ralph, tranlan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 526385 (view as bug list) Environment:
Last Closed: 2010-03-30 08:31:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 526385    
Attachments:
Description Flags
Default configuration fix for hp-sw devices. none

Description Konstantin Khorenko 2008-12-11 11:25:06 UTC
General description: multipath does not work by default, dmesg shows following messages after multipath tool is executed:
...
kernel: device-mapper: table: 253:0: multipath: unknown hardware handler type
kernel: device-mapper: ioctl: error adding target to table
...

The bug was found under CentOS 5.2 nut i believe it's also valid for RHEL 5.2.
OS was installed by default with "linux mpath" option.

Hardware that triggers the problem:
lspci, lspci -n:
03:01.0 Fibre Channel: QLogic Corp. ISP2312-based 2Gb Fibre Channel to PCI-X HBA (rev 02)
03:01.0 0c04: 1077:2312 (rev 02)

# cat /proc/scsi/scsi
Attached devices:
...
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: COMPAQ Model: HSV111 (C)COMPAQ Rev: 4007
  Type: RAID ANSI SCSI revision: 05
...

If /etc/multipath.conf does not contain "hardware_handler" option (by default), multipath consider that hardware handler "hp_sw" should be used:
[root@localhost ~]# multipath -v2 -d
create: mpath0 (3600508b400011c130003000000fc0000) COMPAQ,HSV111 (C)COMPAQ
[size=100G][features=0][hwhandler=1 hp_sw]
\_ round-robin 0 [prio=4][undef]
 \_ 0:0:0:1 sda 8:0 [undef][ready]
 \_ 0:0:1:1 sdb 8:16 [undef][ready]
 \_ 1:0:0:1 sdc 8:32 [undef][ready]
 \_ 1:0:1:1 sdd 8:48 [undef][ready]

If we add correct "hardware_handler" option for the device - the problem is gone. So following solves the problem.
devices {
        device {
                vendor "HP|COMPAQ*"
                product "HSV1*"
                hardware_handler "1 hp-sw"
        }
}

i think this bug is related to
https://bugzilla.redhat.com/show_bug.cgi?id=348951
https://bugzilla.redhat.com/show_bug.cgi?id=226791

it's said the bug is fixed in device-mapper-multipath-0.4.7-17.el5 (in errata), but my problem triggers on device-mapper-multipath-0.4.7-17.el5!

[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.2 (Final)
[root@localhost ~]# rpm -qa |grep mapper
device-mapper-event-1.02.24-1.el5
device-mapper-multipath-0.4.7-17.el5
device-mapper-1.02.24-1.el5 

------------------------------------------
Next issue which might be related:
mkinitrd (mkinitrd-5.1.19.6-28) script does not put dm-hp-sw.ko module into initrd. I believe this is because of the previous issue.
To workaround this i've added following line to the /etc/modprobe.conf:
  alias scsi_hostadapter2 dm-hp-sw

This is incorrect from the logic point of view, but this will give us needed result - dm-hp-sw.ko module will be added into initrd.

------------------------------------------
And the last one:
mkinitrd script does not handle "install" primitive for qla2xxx module in /etc/modprobe.conf (which was set by installer!) and thus qla2xxx.ko module is _not_ put into initrd.
There is already a bug for it https://bugzilla.redhat.com/show_bug.cgi?id=317811, but it was closed as won't fix.

Comment 1 Dave Wysochanski 2009-06-19 14:38:05 UTC
It looks to me the patch may have slipped through the cracks somehow.  I will check with Ben to see when we can get this in.

Comment 2 Ben Marzinski 2009-06-19 22:12:24 UTC
Created attachment 348724 [details]
Default configuration fix for hp-sw devices.

Comment 3 Ben Marzinski 2009-06-19 22:15:21 UTC
Sorry that that default configuration change got missed. You'll need to a open mkinitrd bug for the other issue. This fix will be in RHEL 5.5

Comment 5 michal novacek 2009-12-22 11:24:07 UTC
old version: 0.4.7-17.el5
# multipathd -k"show config" |grep hardware_handler | grep hp
		hardware_handler 1 hp_sw
		hardware_handler 1 hp_sw

new version: 0.4.7-31.el5
# multipathd -k"show config" |grep hardware_handler | grep hp
		hardware_handler 1 hp-sw
		hardware_handler 1 hp-sw

New version correctly fixed the bug reported.

Comment 8 errata-xmlrpc 2010-03-30 08:31:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0255.html