device-mapper-multipath/0003-RH-fixup-udev-rules-for-redhat.patch
Benjamin Marzinski a4bb435b33 device-mapper-multipath-0.7.1-1.gitf21166a
- Update Source to the latest upstream commit
- Add 0001-libmultipath-add-comment-about-resuming.patch
  * posted upstream
- Add 0002-multipath-attempt-at-common-multipath.rules.patch
  * under discussion upstream
- Add 0003-RH-fixup-udev-rules-for-redhat.patch
  * Redhat uses different udev rules that some other distros, so multipath
    has run at a different time. Not all upstream distros link /sbin and
    /usr/sbin either.
- Add 0004-RH-Remove-the-property-blacklist-exception-builtin.patch
  * Allow multipath to be used on devices without multiple paths. NAK'ed
    upstream, but requested by Red Hat
- Add 0005-RH-don-t-start-without-a-config-file.patch
  * Don't start multipath unless a config file exists. NAK'ed upstream,
    but requested by Red Hat
- Add 0006-RH-use-rpm-optflags-if-present.patch
  * Make the build system fedora friendly
- Add 0007-RH-add-mpathconf.patch
  * Add tool to help configure multipath with Red Hat defaults.
- Add 0008-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
  * Make multipath able to claim devices based on the kernel command line
    NAK'ed upstream but requested by Red Hat
- Add 0009-RH-trigger-change-uevent-on-new-device-creation.patch
  * under discussion upstream
2017-05-25 17:12:56 -05:00

111 lines
4.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu, 13 Apr 2017 07:22:23 -0500
Subject: [PATCH] RH: fixup udev rules for redhat
The multipath rules need to run after scsi_id is run. This means moving
them after 60-persistent-storage.rules for redhat. Also, we don't
currently set up all the symlinks that SuSE does. If we want them, they
should be done in the device-mapper package, since they are for all
device-mapper devices. Redhat also uses a different naming scheme for
partitions than SuSE.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
Makefile.inc | 2 +-
kpartx/Makefile | 14 +++++++-------
multipath/Makefile | 4 ++--
multipath/multipath.rules | 3 ++-
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 1815f9a..2591fa9 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -47,7 +47,7 @@ endif
prefix =
exec_prefix = $(prefix)
-bindir = $(exec_prefix)/sbin
+bindir = $(exec_prefix)/usr/sbin
libudevdir = $(prefix)/$(SYSTEMDPATH)/udev
udevrulesdir = $(libudevdir)/rules.d
multipathdir = $(TOPDIR)/libmultipath
diff --git a/kpartx/Makefile b/kpartx/Makefile
index 7b75032..bfa6fe8 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -26,19 +26,19 @@ $(EXEC): $(OBJS)
install: $(EXEC) $(EXEC).8
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
- $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
- $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)/rules.d
- $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)$(libudevdir)/rules.d/66-kpartx.rules
+# $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
+# $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
+# $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)/rules.d
+# $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)$(libudevdir)/rules.d/66-kpartx.rules
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir)
uninstall:
$(RM) $(DESTDIR)$(bindir)/$(EXEC)
$(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz
- $(RM) $(DESTDIR)$(libudevdir)/kpartx_id
- $(RM) $(DESTDIR)$(libudevdir)/rules.d/66-kpartx.rules
- $(RM) $(DESTDIR)$(libudevdir)/rules.d/67-kpartx-compat.rules
+# $(RM) $(DESTDIR)$(libudevdir)/kpartx_id
+# $(RM) $(DESTDIR)$(libudevdir)/rules.d/66-kpartx.rules
+# $(RM) $(DESTDIR)$(libudevdir)/rules.d/67-kpartx-compat.rules
clean:
$(RM) core *.o $(EXEC) *.gz
diff --git a/multipath/Makefile b/multipath/Makefile
index c85314e..1e9ee4b 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -24,7 +24,7 @@ install:
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
- $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules
+ $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir)
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
@@ -33,7 +33,7 @@ install:
uninstall:
$(RM) $(DESTDIR)$(bindir)/$(EXEC)
$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
- $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules
+ $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
$(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz
$(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
diff --git a/multipath/multipath.rules b/multipath/multipath.rules
index 616a04c..4d78b98 100644
--- a/multipath/multipath.rules
+++ b/multipath/multipath.rules
@@ -33,6 +33,7 @@ GOTO="end_mpath"
LABEL="check_kpartx"
+ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
IMPORT{db}="DM_MULTIPATH_NEED_KPARTX"
ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG1"
ENV{DM_SUBSYSTEM_UDEV_FLAG1}=="1", GOTO="end_mpath"
@@ -42,7 +43,7 @@ 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+="/sbin/kpartx -un -p -part /dev/$name"
+RUN+="/sbin/kpartx -un /dev/$name"
ENV{DM_MULTIPATH_NEED_KPARTX}=""
LABEL="end_mpath"
--
2.7.4