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