28ab1c
From 5818f56e99aecca0664f779c29c569f116f907e4 Mon Sep 17 00:00:00 2001
28ab1c
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
28ab1c
Date: Thu, 26 Nov 2020 12:51:47 +0100
28ab1c
Subject: [PATCH] fix(mdraid): add grow continue service
28ab1c
28ab1c
During raid assembly mdadm will call mdadm-grow-continue.service if
28ab1c
reshape is in progress.
28ab1c
If service doesn't exist then it is done via fork and systemd will kill
28ab1c
it unconditionally after processing all events.
28ab1c
28ab1c
Add proper service to allow systemd to manage reshape correctly.
28ab1c
28ab1c
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
28ab1c
(cherry picked from commit 29e269a5225ad8f658a8d7ef64d77d0c02f8e31d)
28ab1c
28ab1c
Resolves: #1958899
28ab1c
---
28ab1c
 modules.d/90mdraid/module-setup.sh | 3 +++
28ab1c
 1 file changed, 3 insertions(+)
28ab1c
28ab1c
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
28ab1c
index 98a4ef5d..2e043041 100755
28ab1c
--- a/modules.d/90mdraid/module-setup.sh
28ab1c
+++ b/modules.d/90mdraid/module-setup.sh
28ab1c
@@ -136,6 +136,9 @@ install() {
28ab1c
         if [ -e $systemdsystemunitdir/mdadm-last-resort@.timer ]; then
28ab1c
             inst_simple $systemdsystemunitdir/mdadm-last-resort@.timer
28ab1c
         fi
28ab1c
+        if [ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-grow-continue@.service ]; then
28ab1c
+            inst_simple $systemdsystemunitdir/mdadm-grow-continue@.service
28ab1c
+        fi
28ab1c
     fi
28ab1c
     inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
28ab1c
     dracut_need_initqueue
28ab1c