chiark / gitweb /
Merge keymap building in the top-level Makefile.am.
[elogind.git] / rules / packages / 64-md-raid.rules
1 # do not edit this file, it will be overwritten on update
2
3 SUBSYSTEM!="block", GOTO="md_end"
4 ACTION!="add|change", GOTO="md_end"
5
6 # import data from a raid member and activate it
7 #ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
8 # import data from a raid set
9 KERNEL!="md*", GOTO="md_end"
10
11 # partitions have no md/{array_state,metadata_version}
12 ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
13
14 # container devices have a metadata version of e.g. 'external:ddf' and
15 # never leave state 'inactive'
16 ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
17 TEST!="md/array_state", GOTO="md_end"
18 ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
19 LABEL="md_ignore_state"
20
21 IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
22 ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
23 ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
24 ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
25 ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
26 ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
27 ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
28 ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
29
30 IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
31 OPTIONS+="link_priority=100"
32 OPTIONS+="watch"
33 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
34 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
35
36 LABEL="md_end"