Blame SOURCES/0002-RH-multipath.rules.patch

38852f
---
38852f
 multipath/Makefile        |    3 +++
38852f
 multipath/multipath.rules |   24 ++++++++++++++++++++++++
38852f
 2 files changed, 27 insertions(+)
38852f
38852f
Index: multipath-tools-130222/multipath/multipath.rules
38852f
===================================================================
38852f
--- /dev/null
38852f
+++ multipath-tools-130222/multipath/multipath.rules
38852f
@@ -0,0 +1,24 @@
38852f
+# multipath wants the devmaps presented as meaninglful device names
38852f
+# so name them after their devmap name
38852f
+SUBSYSTEM!="block", GOTO="end_mpath"
38852f
+
38852f
+ENV{MPATH_SBIN_PATH}="/sbin"
38852f
+TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
38852f
+
38852f
+ACTION=="add", ENV{DEVTYPE}!="partition", \
38852f
+	ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
38852f
+	TEST=="/etc/multipath.conf", \
38852f
+	PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \
38852f
+	ENV{DM_MULTIPATH_DEVICE_PATH}="1"
38852f
+
38852f
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \
38852f
+	RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
38852f
+
38852f
+KERNEL!="dm-*", GOTO="end_mpath"
38852f
+ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
38852f
+ACTION!="change", GOTO="end_mpath"
38852f
+ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
38852f
+ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
38852f
+ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
38852f
+RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode"
38852f
+LABEL="end_mpath"
38852f
Index: multipath-tools-130222/multipath/Makefile
38852f
===================================================================
38852f
--- multipath-tools-130222.orig/multipath/Makefile
38852f
+++ multipath-tools-130222/multipath/Makefile
38852f
@@ -21,12 +21,15 @@ $(EXEC): $(OBJS)
38852f
 install:
38852f
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
38852f
 	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
38852f
+	$(INSTALL_PROGRAM) -d $(DESTDIR)/lib/udev/rules.d
38852f
+	$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/lib/udev/rules.d/62-multipath.rules
38852f
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
38852f
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
38852f
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
38852f
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
38852f
 
38852f
 uninstall:
38852f
+	rm $(DESTDIR)/lib/udev/rules.d/62-multipath.rules
38852f
 	rm $(DESTDIR)$(bindir)/$(EXEC)
38852f
 	rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
38852f
 	rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz