Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 596319 - please cleanup 40-multipath.rules
Summary: please cleanup 40-multipath.rules
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-multipath
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Storage QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-26 15:30 UTC by Harald Hoyer
Modified: 2010-11-10 20:10 UTC (History)
13 users (show)

Fixed In Version: device-mapper-multipath-0.4.9-22.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 20:10:35 UTC
Target Upstream Version:


Attachments (Terms of Use)
40-multipath.rules (deleted)
2010-05-26 15:30 UTC, Harald Hoyer
no flags Details

Description Harald Hoyer 2010-05-26 15:30:14 UTC
Created attachment 416880 [details]
40-multipath.rules

Description of problem:
If a whole device is used for multipath, the underlying devices should have the partitions removed.

Please ship the attached 40-multipath.rules

This blocks bug 595719

Comment 2 Harald Hoyer 2010-05-26 17:14:44 UTC
btw, if the multipath rules would be a little bit later (70 instead of 40), you could honor the udev environment variables and skip the scsi_id run.

ID_SERIAL=3600a0b800034867a000005cd47d96f66
ID_WWN=0x600a0b800034867a
ID_WWN_VENDOR_EXTENSION=0x000005cd47d96f66
ID_WWN_WITH_EXTENSION=0x600a0b800034867a000005cd47d96f66

Comment 3 Harald Hoyer 2010-05-27 16:15:07 UTC
another optimization would also be only run "multipath -c" on non-partition devices.


SUBSYSTEM!="block", GOTO="end_mpath"
ENV{DEVTYPE}!="partition", \
   ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
   PROGRAM=="/sbin/multipath -c $tempnode", \
   ENV{DM_MULTIPATH_DEVICE_PATH}="1"

ENV{DM_MULTIPATH_DEVICE_PATH}=="1", \
   ENV{DEVTYPE}!="partition", \
   RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"

RUN+="socket:/org/kernel/dm/multipath_event"

KERNEL!="dm-*", GOTO="end_mpath"
ACTION!="change", GOTO="end_mpath"
ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
RUN+="$env{DM_SBIN_PATH}/kpartx -a -p p $tempnode"
LABEL="end_mpath"

Comment 4 Ben Marzinski 2010-05-28 22:45:37 UTC
Unfortunately, I do need to check if multipath is in /sbin or /usr/sbin.  It's necessary for anaconda, and unless I'm working on a dm device, I can't use $env{DM_SBIN_PATH}. The ENV{MPATH_GOT_HERE} was just debuginfo information that never got deleted from the patch, but the rest (or something like it) is necessary.  Otherwise the patch seems reasonable.

Comment 5 Harald Hoyer 2010-06-10 16:17:15 UTC
"/sbin/multipath -c" should only run on ACTION=="add"

Comment 6 Ben Marzinski 2010-06-16 23:30:27 UTC
Here are the new rules:

SUBSYSTEM!="block", GOTO="end_mpath"

ENV{MPATH_SBIN_PATH}="/sbin"
TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"

ACTION=="add", ENV{DEVTYPE}!="partition", \
        ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
        PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \
        ENV{DM_MULTIPATH_DEVICE_PATH}="1"

ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \
        RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"

RUN+="socket:/org/kernel/dm/multipath_event"
KERNEL!="dm-*", GOTO="end_mpath"
ACTION!="change", GOTO="end_mpath"
ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode"
LABEL="end_mpath"

Comment 7 Harald Hoyer 2010-06-17 08:10:59 UTC
fine, this might work

Comment 8 Ben Marzinski 2010-06-19 02:15:44 UTC
Done.

Comment 10 releng-rhel@redhat.com 2010-11-10 20:10:35 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.