[dm-devel] [PATCH] kpartx: partitions of mapped devices cannot be created in redhat OS

Hannes Reinecke hare at suse.de
Mon Sep 12 06:09:57 UTC 2016


On 09/09/2016 09:04 PM, Benjamin Marzinski wrote:
> 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}=""
> 
> 
Any particular reason why this can't be a separate rules file?
I'm perfectly fine with having SUSE and RH specific kpartx rules...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list