device-mapper-multipath/multipath_rules.patch
Benjamin Marzinski 765b685946 Since libaio is now in /lib, not /usr/lib, multipath no longer needs to
statically link against it. Fixed an error with binding file and WWIDs
    that include spaces. Cleaned up the messages from the directio checker
    function. Fixed the udev rules. Fixed a regression in multipath.conf
    parsing Fixed 457530, 457589
2008-09-26 23:28:36 +00:00

42 lines
1.7 KiB
Diff

Index: multipath-tools/multipath/Makefile
===================================================================
--- multipath-tools.orig/multipath/Makefile
+++ multipath-tools/multipath/Makefile
@@ -23,7 +23,7 @@ install:
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) mpath_wait $(DESTDIR)$(bindir)/
$(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
+ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
@@ -34,7 +34,7 @@ install:
$(INSTALL_PROGRAM) -d $(DESTDIR)/var/lib/multipath
uninstall:
- rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
+ rm $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
rm $(DESTDIR)$(bindir)/$(EXEC)
rm $(DESTDIR)$(bindir)/mpath_wait
rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
Index: multipath-tools/multipath/multipath.rules
===================================================================
--- multipath-tools.orig/multipath/multipath.rules
+++ multipath-tools/multipath/multipath.rules
@@ -1,7 +1,8 @@
-#
-# udev rules for multipathing.
-# The persistent symlinks are created with the kpartx rules
-#
-
-# socket for uevents
+# multipath wants the devmaps presented as meaninglful device names
+# so name them after their devmap name
+SUBSYSTEM!="block", GOTO="end_mpath"
RUN+="socket:/org/kernel/dm/multipath_event"
+KERNEL!="dm-[0-9]*", GOTO="end_mpath"
+PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath"
+ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
+LABEL="end_mpath"