]> git.ipfire.org Git - thirdparty/mdadm.git/blame - udev-md-raid-assembly.rules
Incremental: improve support for "DEVICE" based restriction in mdadm.conf
[thirdparty/mdadm.git] / udev-md-raid-assembly.rules
CommitLineData
2452f13a
TB
1# do not edit this file, it will be overwritten on update
2
3# assemble md arrays
4
5SUBSYSTEM!="block", GOTO="md_inc_end"
6
7# handle potential components of arrays (the ones supported by md)
8ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
9GOTO="md_inc_end"
10
11LABEL="md_inc"
12
13# remember you can limit what gets auto/incrementally assembled by
14# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
b11fe74d 15ACTION=="add", IMPORT{program}="/sbin/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
169ffac7 16ACTION=="add", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
2452f13a
TB
17ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
18ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
19
20LABEL="md_inc_end"