[dm-devel] [PATCH 3/6] multipath-tools: install modules-load.d/multipath.conf
Benjamin Marzinski
bmarzins at redhat.com
Thu Feb 3 00:40:00 UTC 2022
On Wed, Feb 02, 2022 at 12:40:21AM +0100, mwilck at suse.com wrote:
> From: Martin Wilck <mwilck at suse.com>
>
> If multipath-tools is installed, we want to load the dm-multipath
> module early on, because multipath -u might spit out irritating
> error messages in syslog otherwise.
>
> Signed-off-by: Martin Wilck <mwilck at suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins at redhat.com>
> ---
> Makefile.inc | 1 +
> multipath/Makefile | 3 +++
> multipath/modules-load.conf | 3 +++
> 3 files changed, 7 insertions(+)
> create mode 100644 multipath/modules-load.conf
>
> diff --git a/Makefile.inc b/Makefile.inc
> index c5f1fa5..5223c96 100644
> --- a/Makefile.inc
> +++ b/Makefile.inc
> @@ -73,6 +73,7 @@ usr_prefix = $(prefix)
> bindir = $(exec_prefix)/sbin
> libudevdir = $(prefix)/$(SYSTEMDPATH)/udev
> udevrulesdir = $(libudevdir)/rules.d
> +modulesloaddir = $(prefix)/$(SYSTEMDPATH)/modules-load.d
> multipathdir = $(TOPDIR)/libmultipath
> man8dir = $(prefix)/usr/share/man/man8
> man5dir = $(prefix)/usr/share/man/man5
> diff --git a/multipath/Makefile b/multipath/Makefile
> index c690368..015f73c 100644
> --- a/multipath/Makefile
> +++ b/multipath/Makefile
> @@ -23,6 +23,8 @@ install:
> $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
> $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
> $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules
> + $(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir)
> + $(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf
> $(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
> $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(man8dir)
> $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
> @@ -31,6 +33,7 @@ install:
> uninstall:
> $(RM) $(DESTDIR)$(bindir)/$(EXEC)
> $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
> + $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
> $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules
> $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8
> $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5
> diff --git a/multipath/modules-load.conf b/multipath/modules-load.conf
> new file mode 100644
> index 0000000..b517d32
> --- /dev/null
> +++ b/multipath/modules-load.conf
> @@ -0,0 +1,3 @@
> +# load dm-multipath early, both multipathd and multipath depend on it
> +# (note that multipath may be called from udev rules!)
> +dm-multipath
> --
> 2.34.1
More information about the dm-devel
mailing list