~xnox/ubuntu/quantal/mdadm/quantal

« back to all changes in this revision

Viewing changes to .pc/debian/disable-udev-incr-assembly.diff/udev-md-raid.rules

  • Committer: Dmitrijs Ledkovs
  • Author(s): Clint Byrum
  • Date: 2011-12-16 11:06:12 UTC
  • mfrom: (1.1.26 sid)
  • Revision ID: dmitrijs.ledkovs@canonical.com-20111216110612-f91bfvyfvxc1t0rq
Tags: 3.2.2-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Call checks in local-premount to avoid race condition with udev
    and opening a degraded array.
  - d/initramfs/mdadm-functions: Record in /run when boot-degraded 
    question has been asked so that it is only asked once
  - pass --test to mdadm to enable result codes for degraded arrays. 
  - Build udeb with -O2 on ppc64, working around a link error.
  - debian/control: we need udev and util-linux in the right version. We
    also remove the build dependency from quilt and docbook-to-man as both
    are not used in Ubuntus mdadm.
  - debian/initramfs/hook: kept the Ubuntus version for handling the absence
    of active raid arrays in <initramfs>/etc/mdadm/mdadm.conf
  - debian/initramfs/script.local-top.DEBIAN, debian/mdadm-startall,
    debian/mdadm.raid.DEBIAN: removed. udev does its job now instead.
  - debian/mdadm-startall.sgml, debian/mdadm-startall.8: documentation of
    unused startall script
  - debian/mdadm.config, debian/mdadm.postinst - let udev do the handling
    instead. Resolved merge conflict by keeping Ubuntu's version.
  - debian/mdadm.postinst, debian/mdadm.config, initramfs/init-premount:
    boot-degraded enablement; maintain udev starting of RAID devices;
    init-premount hook script for the initramfs, to provide information at
    boot
  - debian/mkconf.in is the older mkconf. Kept the Ubuntu version.
  - debian/rules: Kept Ubuntus version for installing apport hooks, not
    installing un-used startall script and for adding a udev rule
    corresponding to mdadm.
  - debian/install-rc, check.d/_numbers, check.d/root_on_raid: Ubuntu partman
    installer changes
  - debian/presubj: Dropped this unused bug reporting file. Instead use
    source_mdadm.py act as an apport hook for bug handling.
  - rename debian/mdadm.vol_id.udev to debian/mdadm.mdadm-blkid.udev so that
    the rules file ends up with a more reasonable name
  - d/p/debian-changes-3.1.4-1+8efb9d1ubuntu4: mdadm udev rule
    incrementally adds mdadm member when detected. Starting such an
    array in degraded mode is possible by mdadm -IRs. Using mdadm
    -ARs without stopping the array first does nothing when no
    mdarray-unassociated device is available. Using mdadm -IRs to
    start a previously partially assembled array through incremental
    mode. Keeping the mdadm -ARs for assembling arrays which were for
    some reason not assembled through incremental mode (i.e through
    mdadm's udev rule).
* Disabling -fno-strict-aliasing as according to debian bug 375876 it
  has been unnecessary since mdadm 2.5.2
* Dropped changes:
  - applied upstream
  - d/rules: fix FTBFS by adding -Wno-unused-but-set-variable to
    compiler flags until upstream solves the issue. (fixed upstream)
  - d/control: add dependency on initscripts >= 2.88dsf-13.3 to ensure
    /run exists per http://wiki.debian.org/ReleaseGoals/RunDirectory
    (change also done in debian)
* d/rules: add 'man' to build mdadm.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# do not edit this file, it will be overwritten on update
 
2
 
 
3
SUBSYSTEM!="block", GOTO="md_end"
 
4
 
 
5
# handle potential components of arrays
 
6
ENV{ID_FS_TYPE}=="linux_raid_member", ACTION=="remove", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
 
7
ENV{ID_FS_TYPE}=="linux_raid_member", ACTION=="add", RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
 
8
ENV{ID_FS_TYPE}=="isw_raid_member", ACTION=="remove", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
 
9
ENV{ID_FS_TYPE}=="isw_raid_member", ACTION=="add", RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
 
10
 
 
11
# handle md arrays
 
12
ACTION!="add|change", GOTO="md_end"
 
13
KERNEL!="md*", GOTO="md_end"
 
14
 
 
15
# partitions have no md/{array_state,metadata_version}, but should not
 
16
# for that reason be ignored.
 
17
ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
 
18
 
 
19
# container devices have a metadata version of e.g. 'external:ddf' and
 
20
# never leave state 'inactive'
 
21
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
 
22
TEST!="md/array_state", GOTO="md_end"
 
23
ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
 
24
LABEL="md_ignore_state"
 
25
 
 
26
IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
 
27
ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
 
28
ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
 
29
ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
 
30
ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
 
31
ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
 
32
ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
 
33
ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
 
34
 
 
35
IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
 
36
OPTIONS+="link_priority=100"
 
37
OPTIONS+="watch"
 
38
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
 
39
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
 
40
 
 
41
LABEL="md_end"