summaryrefslogtreecommitdiffstats
path: root/udev-md-raid-arrays.rules
diff options
context:
space:
mode:
authorTkaczyk Mariusz <mariusz.tkaczyk@intel.com>2020-10-15 10:45:29 +0200
committerJes Sorensen <jsorensen@fb.com>2020-11-26 00:21:57 +0100
commita64f1263a56bd8653267c1a9800daa0bc993a743 (patch)
treefc2d24eb0658b8f5ecf7c1ba8a4929e710245cfa /udev-md-raid-arrays.rules
parentMake target to install binaries only (diff)
downloadmdadm-a64f1263a56bd8653267c1a9800daa0bc993a743.tar.xz
mdadm-a64f1263a56bd8653267c1a9800daa0bc993a743.zip
udev: start grow service automatically
Grow continue via service or fork is started during raid assembly. If raid was assembled in initrd it will be newer restarted after switch root. Add udev support for starting mdadm-grow-continue service. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
Diffstat (limited to 'udev-md-raid-arrays.rules')
-rw-r--r--udev-md-raid-arrays.rules2
1 files changed, 2 insertions, 0 deletions
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
index c8fa8e89..13c9076e 100644
--- a/udev-md-raid-arrays.rules
+++ b/udev-md-raid-arrays.rules
@@ -15,6 +15,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
ATTR{md/array_state}=="clear*|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
+ATTR{md/sync_action}=="reshape", ENV{RESHAPE_ACTIVE}="yes"
LABEL="md_ignore_state"
IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
@@ -38,5 +39,6 @@ ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
# Tell systemd to run mdmon for our container, if we need it.
ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c"
ENV{MD_MON_THIS}=="?*", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service"
+ENV{RESHAPE_ACTIVE}=="yes", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdadm-grow-continue@%c.service"
LABEL="md_end"