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