dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/0106-udev-start-grow-service-automatically.patch

3c4af5
From a64f1263a56bd8653267c1a9800daa0bc993a743 Mon Sep 17 00:00:00 2001
3c4af5
From: Tkaczyk Mariusz <mariusz.tkaczyk@intel.com>
3c4af5
Date: Thu, 15 Oct 2020 10:45:29 +0200
3c4af5
Subject: [PATCH 106/108] udev: start grow service automatically
3c4af5
3c4af5
Grow continue via service or fork is started during raid assembly.
3c4af5
If raid was assembled in initrd it will be newer restarted after
3c4af5
switch root.
3c4af5
Add udev support for starting mdadm-grow-continue service.
3c4af5
3c4af5
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
3c4af5
---
3c4af5
 udev-md-raid-arrays.rules | 2 ++
3c4af5
 1 file changed, 2 insertions(+)
3c4af5
3c4af5
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
3c4af5
index c8fa8e8..13c9076 100644
3c4af5
--- a/udev-md-raid-arrays.rules
3c4af5
+++ b/udev-md-raid-arrays.rules
3c4af5
@@ -15,6 +15,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
3c4af5
 ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
3c4af5
 TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
3c4af5
 ATTR{md/array_state}=="clear*|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
3c4af5
+ATTR{md/sync_action}=="reshape", ENV{RESHAPE_ACTIVE}="yes"
3c4af5
 LABEL="md_ignore_state"
3c4af5
 
3c4af5
 IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
3c4af5
@@ -38,5 +39,6 @@ ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
3c4af5
 # Tell systemd to run mdmon for our container, if we need it.
3c4af5
 ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c"
3c4af5
 ENV{MD_MON_THIS}=="?*", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service"
3c4af5
+ENV{RESHAPE_ACTIVE}=="yes", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdadm-grow-continue@%c.service"
3c4af5
 
3c4af5
 LABEL="md_end"
3c4af5
-- 
3c4af5
2.7.5
3c4af5