RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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: 595719 597395
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:
Embargoed:


Attachments (Terms of Use)
40-multipath.rules (598 bytes, text/plain)
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.