device-mapper-multipath/0002-RH-multipath.rules.patch
Benjamin Marzinski d1207a7795 device-mapper-multipath-0.4.9-45
Updated to latest upstrem 0.4.9 code: multipath-tools-130222
  (git commit id: 67b82ad6fe280caa1770025a6bb8110b633fa136)
Refresh 0001-RH-dont_start_with_no_config.patch
Modify 0002-RH-multipath.rules.patch
Modify 0003-RH-Make-build-system-RH-Fedora-friendly.patch
Refresh 0004-RH-multipathd-blacklist-all-by-default.patch
Refresh 0005-RH-add-mpathconf.patch
Refresh 0006-RH-add-find-multipaths.patch
Add 0008-RH-revert-partition-changes.patch
Rename 0008-RH-RHEL5-style-partitions.patch to
       0009-RH-RHEL5-style-partitions.patch
Rename 0009-RH-dont-remove-map-on-enomem.patch to
       0010-RH-dont-remove-map-on-enomem.patch
Rename 0010-RH-deprecate-uid-gid-mode.patch to
       0011-RH-deprecate-uid-gid-mode.patch
Rename 0013-RH-kpartx-msg.patch to 0012-RH-kpartx-msg.patch
Rename 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch to
       0013-RHBZ-883981-cleanup-rpmdiff-issues.patch
Rename 0039-RH-handle-other-sector-sizes.patch to
       0014-RH-handle-other-sector-sizes.patch
Rename 0040-RH-fix-output-buffer.patch to 0015-RH-fix-output-buffer.patch
Add 0016-RH-dont-print-ghost-messages.patch
Add 0017-RH-fix-sigusr1.patch
  * Actually this fixes a number of issues related to signals
Rename 0018-RH-remove-config-dups.patch to 0018-RH-fix-factorize.patch
  * just the part that isn't upstream
Add 0019-RH-fix-sockets.patch
  * makes abstract multipathd a cli sockets use the correct name.
Set find_multipaths in the default config
2013-03-02 17:03:30 -06:00

55 lines
2.1 KiB
Diff

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