[dm-devel] [PATCH] kpartx: partitions of mapped devices cannot be created in redhat OS
Benjamin Marzinski
bmarzins at redhat.com
Fri Sep 9 19:04:38 UTC 2016
On Fri, Sep 09, 2016 at 10:24:29AM +0800, zhang.kai16 at zte.com.cn wrote:
> How to create partitions without kpartx.rules if we want to use the latest
> version multipath-tools of opensvc in rhel7.2?
This is what's at the end of the /lib/udev/rules.d/62-multipath.rules
file that gets installed with the regular rhel-7.2 multipath package. If
you add it to the end of the multipath.rules file that gets installed
with the upstream package, just before the
LABEL="end_mpath"
line, it should work fine:
ACTION=="change", IMPORT{db}="DM_MULTIPATH_NEED_KPARTX"
KERNEL!="dm-*", GOTO="end_mpath"
ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*",
OPTIONS+="link_priority=10"
ACTION!="change", GOTO="end_mpath"
ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
ENV{DM_SUBSYSTEM_UDEV_FLAG1}=="1", GOTO="end_mpath"
ENV{DM_ACTIVATION}=="1", ENV{DM_MULTIPATH_NEED_KPARTX}="1"
ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
ENV{DM_ACTIVATION}!="1", ENV{DM_MULTIPATH_NEED_KPARTX}!="1",
GOTO="end_mpath"
RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode", \
ENV{DM_MULTIPATH_NEED_KPARTX}=""
>
> ������: "Benjamin Marzinski" <bmarzins at redhat.com>
> �ռ���: Ritesh Raj Sarraf <rrs at researchut.com>,
> ����: dm-devel at redhat.com
> ����: 2016-09-09 00:02
> ����: Re: [dm-devel] [PATCH] kpartx: partitions of mapped devices
> cannot be created in redhat OS
> ������: dm-devel-bounces at redhat.com
>
> --------------------------------------------------------------------------
>
> On Tue, Sep 06, 2016 at 05:09:28PM +0530, Ritesh Raj Sarraf wrote:
> > Yes. In Debian too, we've been hit by something similar.
> >
> > [1]http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827412
> >
> [2]https://anonscm.debian.org/cgit/pkg-lvm/multipath-tools.git/tree/debian/dmsetup_
> > env
>
> I just want to point out that we don't actually distribute kpartx.rules
> in the redhat releases of the multipath-tools.
>
> -Ben
>
> >
> >
> >
> > On Mon, 2016-08-29 at 19:12 +0800, tang.junhui at zte.com.cn wrote:
> > > From: "tang.junhui" <tang.junhui at zte.com.cn>
> > >
> > > Environment variables such as DM_TABLE_STATE are used in kpartx.rules
> which
> > > exported
> > > by "dmsetup export" in previous udev rules in SuSE OS, however, there
> is no
> > > such command
> > > "dmsetup export" in redhat OS, so these environment variables are not
> > > initialized and
> > > partitions cannot be created. This patch replace "dmsetup export" with
> > > "dmsetup info"
> > > to get the status of mapped device, which can work well both in SuSE
> and
> > > redhat OS.
> > --
> > Given the large number of mailing lists I follow, I request you to CC
> > me in replies for quicker response
>
> > --
> > dm-devel mailing list
> > dm-devel at redhat.com
> > [3]https://www.redhat.com/mailman/listinfo/dm-devel
>
> --
> dm-devel mailing list
> dm-devel at redhat.com
> [4]https://www.redhat.com/mailman/listinfo/dm-devel
>
> References
>
> Visible links
> 1. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827412
> 2. https://anonscm.debian.org/cgit/pkg-lvm/multipath-tools.git/tree/debian/dmsetup_
> 3. https://www.redhat.com/mailman/listinfo/dm-devel
> 4. https://www.redhat.com/mailman/listinfo/dm-devel
More information about the dm-devel
mailing list