[Bug 737027] Re: kpartx udev rule is broken
Jesse Johnson
bbuknight at gmail.com
Fri Sep 23 23:44:35 UTC 2011
Ok, so to fix this problem follow these steps (assuming you are using
Ubuntu 11.04):
1. Modify this line in /lib/udev/rules.d/95-kpartx.rules
ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \
RUN+="/sbin/kpartx -p -part -a /dev/$kernel"
by changing "dmraid-*" to "DMRAID-*" and remove the '-p -part'
switch so that you get
ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="DMRAID-*", \
RUN+="/sbin/kpartx -a /dev/$kernel"
As mentioned in the bug report, the switch to uppercase is required
since id's for dmraid mapped devices follow that convention. The
removal of the -p switch is meant to allow kpartx use its default
partition map naming scheme rather than a distro specific one. Not sure
if Debian ever changed this.
2. Modify this line in the script /sbin/dmraid-activate
dmraid -i -ay -Z "$1"
by inserting the -p switch as suggested John in comment #14 so you
obtain
dmraid -i -ay -p -Z "$1"
Now dmraid will not map partitions, leaving that job to kpartx when
it is called in its respective udev rule.
3. Done!
I am not sure how to convert my changes into an uploadable patch via
Launchpad. Could someone please direct me to a tutorial or give a brief
example?
It would be nice if kpartx was integrated into dmraid itself or else at
least replace the partition mapping portion of dmraid with calls to
kpartx and bundle the two together (as suggested in the dmraid TODO
file). I assume such changes must be made upstream. If so, where should
I go to make / suggest the changes?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/737027
Title:
kpartx udev rule is broken
Status in “dmraid” package in Ubuntu:
In Progress
Status in “multipath-tools” package in Ubuntu:
In Progress
Status in “multipath-tools” package in Debian:
New
Bug description:
Binary package hint: multipath-tools
The kpartx udev rule looks like this:
ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \
RUN+="/sbin/kpartx -a -p -part /dev/$kernel"
This kpartx command should not be run because dmraid already creates
the partition device, but it isn't run anyhow because the rule matches
on "dmraid-*" but dmraid devices have an id of the form "DMRAID-*".
Note the difference in case.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/737027/+subscriptions
More information about the foundations-bugs
mailing list