]> git.ipfire.org Git - thirdparty/mdadm.git/blame - udev-md-raid-assembly.rules
tests: add test that DDF marks missing devices as failed on assembly.
[thirdparty/mdadm.git] / udev-md-raid-assembly.rules
CommitLineData
2452f13a
TB
1# do not edit this file, it will be overwritten on update
2
05ec50a5
N
3# Don't process any events if anaconda is running as anaconda brings up
4# raid devices manually
5ENV{ANACONDA}=="?*", GOTO="md_inc_end"
2452f13a
TB
6# assemble md arrays
7
8SUBSYSTEM!="block", GOTO="md_inc_end"
9
10# handle potential components of arrays (the ones supported by md)
05ec50a5
N
11ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
12
13# "noiswmd" on kernel command line stops mdadm from handling
14# "isw" (aka IMSM - Intel RAID).
15# "nodmraid" on kernel command line stops mdadm from handling
16# "isw" or "ddf".
17IMPORT{cmdline}="noiswmd"
18IMPORT{cmdline}="nodmraid"
19
20ENV{nodmraid}=="?*", GOTO="md_inc_end"
21ENV{ID_FS_TYPE}=="ddf_raid_member", GOTO="md_inc"
22ENV{noiswmd}=="?*", GOTO="md_inc_end"
23ENV{ID_FS_TYPE}=="isw_raid_member", GOTO="md_inc"
2452f13a
TB
24GOTO="md_inc_end"
25
26LABEL="md_inc"
27
28# remember you can limit what gets auto/incrementally assembled by
29# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
25392f5f
N
30ACTION=="add|change", IMPORT{program}="/sbin/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
31ACTION=="add|change", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
2452f13a
TB
32ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
33ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
34
35LABEL="md_inc_end"