~ubuntu-branches/ubuntu/intrepid/multipath-tools/intrepid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/udev.diff

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-12-13 03:03:31 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20071213030331-bp0r75kwexi0o33m
Tags: 0.4.8-5ubuntu1
* Merge from debian unstable, remaining changes:
  - DebianMaintainerField.
  - Suggest sg3-utils, Conflict with sg-utils.
  - Replace multipath-tools-boot init script with udev rules in
    kpartx.rules.
  - Add /sbin/hsg80_start.
  - Move udev rules to priority 95, and drop call to dmsetup_env.
  - Add devices as they appear
  - Fix preinst script to modprobe dm-multipath. This will make sure
    that multipathd will be able to start.
  - Fix init script not to die on stop if multipathd is not running.
  - Add prerm script to not fail when upgrading from a broken version of
    multipathd.
  - Set umask in multipathd.
  - Handle udev rules priority change in preinst.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Naurd multipath-tools-0.4.7.orig/multipath/multipath.rules multipath-tools-0.4.7/multipath/multipath.rules
2
 
--- multipath-tools-0.4.7.orig/multipath/multipath.rules        2006-03-13 16:12:08.000000000 +0100
3
 
+++ multipath-tools-0.4.7/multipath/multipath.rules     2007-06-13 11:54:55.000000000 +0200
4
 
@@ -6,13 +6,29 @@
5
 
 # !! check the other installed rules !!
6
 
 #
7
 
 
8
 
-# lookup the devmap name
9
 
-#ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
10
 
-#      PROGRAM="/sbin/devmap_name %M %m"
11
 
-ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
12
 
-       PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info"
13
 
+ACTION=="add|change", SUBSYSTEM=="block", \
14
 
+        RUN+="/sbin/modprobe -Qba dm-multipath"
15
 
+
16
 
+## take care to inizialize HSG80 disks when configured in multibus failover
17
 
+# old kernels reports 2097152 (10GB) size on the passive path
18
 
+ACTION=="add", SUBSYSTEM=="block", \
19
 
+        ATTRS{model}=="HSG80", ATTRS{size}=="2097152", \
20
 
+        RUN+="/sbin/hsg80_start %k", \
21
 
+       GOTO="nomultipath"
22
 
+
23
 
+# new kernels report 0 size on the passive path
24
 
+ACTION=="add", SUBSYSTEM=="block", \
25
 
+        ATTRS{model}=="HSG80", ATTRS{size}=="0", \
26
 
+        RUN+="/sbin/hsg80_start %k", \
27
 
+       GOTO="nomultipath"
28
 
+
29
 
+# call multipath -v 0 to add devices as they appear
30
 
+ACTION=="add|change", SUBSYSTEM=="block", \
31
 
+       RUN+="/sbin/multipath -v 0 /dev/%k"
32
 
+
33
 
+LABEL="nomultipath"
34
 
 
35
 
 # take care of devmap partitioning
36
 
-ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
37
 
+ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="dm-*", \
38
 
+       PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info", \
39
 
        RUN+="/sbin/kpartx -a /dev/mapper/%c"
40
 
-