1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff -ru multipath-tools-0.4.7-orig/multipath/Makefile multipath-tools-0.4.7/multipath/Makefile
--- multipath-tools-0.4.7-orig/multipath/Makefile 2007-08-22 16:19:00.877039944 +0200
+++ multipath-tools-0.4.7/multipath/Makefile 2007-08-22 16:20:00.382334855 +0200
@@ -39,12 +39,12 @@
install -d $(DESTDIR)$(bindir)
install -m 755 $(EXEC) $(DESTDIR)$(bindir)/
install -d $(DESTDIR)/etc/udev/rules.d
- install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
+ install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/65-multipath.rules
install -d $(DESTDIR)$(mandir)
install -m 644 $(EXEC).8 $(DESTDIR)$(mandir)
uninstall:
- rm $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
+ rm $(DESTDIR)/etc/udev/rules.d/64-multipath.rules
rm $(DESTDIR)$(bindir)/$(EXEC)
rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
diff -ru multipath-tools-0.4.7-orig/multipath/multipath.rules multipath-tools-0.4.7/multipath/multipath.rules
--- multipath-tools-0.4.7-orig/multipath/multipath.rules 2007-08-22 16:19:22.878997659 +0200
+++ multipath-tools-0.4.7/multipath/multipath.rules 2007-08-22 16:21:02.887896761 +0200
@@ -1,18 +1,13 @@
+# do not edit this file, it will be overwritten on update
#
# multipath and multipath partitions nodes are created in /dev/mapper/
# this file should be installed in /etc/udev/rules.d
#
-# !! udev must not discard DM events !!
-# !! check the other installed rules !!
-#
-# lookup the devmap name
-#ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
-# PROGRAM="/sbin/devmap_name %M %m"
-ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
- PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info"
+# DM_NAME is set in 64-device-mapper.rules
# take care of devmap partitioning
ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
- RUN+="/sbin/kpartx -a /dev/mapper/%c"
+ ENV{DM_NAME}=="?*", \
+ RUN+="/sbin/kpartx -a /dev/mapper/$env{DM_NAME}"
|