chiark / gitweb /
rules: zaptel - add "dialout" group
[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 # container devices have a metadata version of e.g. 'external:ddf' and
12 # never leave state 'inactive'
13 ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
14 ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
15 LABEL="md_ignore_state"
16
17 IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
18 ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
19 ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
20 ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
21 ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
22 ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
23 ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
24 ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
25
26 IMPORT{program}="vol_id --export $tempnode"
27 OPTIONS+="link_priority=100"
28 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
29 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
30
31 LABEL="md_end"