[dm-devel] [PATCH 2/2] multipath: attempt at common multipath.rules

Martin Wilck mwilck at suse.com
Thu Apr 13 15:27:04 UTC 2017


Hi Ben,

> This is a proposal to try and bring the Redhat and SuSE
> multipath.rules
> closer. There are a couple of changes that I'd like some input on.

Thanks for making this so explicit. Perhaps we should have done the
same for our recent changes, in particular d7188fcd "multipathd: start
daemon after udev trigger".

> The big change is moving the kpartx call into the multipath
> rules.  Half
> of the current kpartx.rules file is about creating symlinks for
> multiple
> types of dm devices. The other half auto-creates kpartx devices on
> top
> of multipath devices. Since it is only creating kpartx devices on top
> of
> multipath devices, I've moved the these rules into multipath.rules,
> or
> rather, I've replaced them with the redhat rules in multipath.rules.
> The
> biggest difference is the kpartx isn't run on every reload.  It works
> with the 11-dm-mpath.rules code to not run kpartx on multipathd
> generated reloads or when there aren't any working paths. It does
> remember if it didn't get to run kpartx when it was supposed to
> (because
> there were no valid paths or the device was suspended) and will make
> sure to run it on the next possible uevent.
> 
> The other change is the redhat multipath rules remove the partition
> device nodes for devices claimed by multipath. The udev rule will
> only
> do this one time (both to keep from running partx on every event, and
> so
> that if users manually reread the partition table, we don't keep
> removing them when clearly they are wanted). Redhat does this because
> we
> had multiple customer issues where they were using the scsi
> partitions
> instead of the kpartx devices. Obviously, with setting the partition
> devices to not ready and clearing their fs_type, this isn't
> essential,
> but it has helped make customers do the right thing.
> 
> Cc: Martin Wilck <mwilck at suse.com>
> Cc: Hannes Reinecke <hare at suse.de>
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
> ---
>  kpartx/kpartx.rules       |  8 --------
>  multipath/multipath.rules | 27 ++++++++++++++++++++++++---
>  2 files changed, 24 insertions(+), 11 deletions(-)
> 

All of this makes sense to me. But I may not overlook all the possible
pitfalls in the udev rules, so please wait for Hannes' comments, too.

Regards
Martin

-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list