Blame SOURCES/0044-mdcheck-when-mdcheck_start-is-enabled-enable-mdcheck.patch

f9a9f5
From 6636788aaf4ec0cacaefb6e77592e4a68e70a957 Mon Sep 17 00:00:00 2001
f9a9f5
From: NeilBrown <neilb@suse.de>
f9a9f5
Date: Wed, 30 Oct 2019 10:32:41 +1100
f9a9f5
Subject: [RHEL7.8 PATCH V2 44/47] mdcheck: when mdcheck_start is enabled,
f9a9f5
 enable mdcheck_continue too.
f9a9f5
f9a9f5
mdcheck_continue continues a regular array scan that was started by
f9a9f5
mdcheck_start.
f9a9f5
mdcheck_start will ensure that mdcheck_continue is active.
f9a9f5
Howver if you reboot after a check has started, but before it finishes,
f9a9f5
then mdcheck_continue won't cause it to continue, because nothing
f9a9f5
starts it on boot.
f9a9f5
f9a9f5
So add an install option for mdcheck_contine, and make sure it
f9a9f5
gets enabled when mdcheck_start is enabled.
f9a9f5
f9a9f5
Signed-off-by: NeilBrown <neilb@suse.de>
f9a9f5
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
f9a9f5
---
f9a9f5
 systemd/mdcheck_continue.timer | 2 ++
f9a9f5
 systemd/mdcheck_start.timer    | 1 +
f9a9f5
 2 files changed, 3 insertions(+)
f9a9f5
f9a9f5
diff --git a/systemd/mdcheck_continue.timer b/systemd/mdcheck_continue.timer
f9a9f5
index 3ccfd78..dba1074 100644
f9a9f5
--- a/systemd/mdcheck_continue.timer
f9a9f5
+++ b/systemd/mdcheck_continue.timer
f9a9f5
@@ -11,3 +11,5 @@ Description=MD array scrubbing - continuation
f9a9f5
 [Timer]
f9a9f5
 OnCalendar= 1:05:00
f9a9f5
 
f9a9f5
+[Install]
f9a9f5
+WantedBy= mdmonitor.service
f9a9f5
diff --git a/systemd/mdcheck_start.timer b/systemd/mdcheck_start.timer
f9a9f5
index 6480736..9e7e02a 100644
f9a9f5
--- a/systemd/mdcheck_start.timer
f9a9f5
+++ b/systemd/mdcheck_start.timer
f9a9f5
@@ -13,3 +13,4 @@ OnCalendar=Sun *-*-1..7 1:00:00
f9a9f5
 
f9a9f5
 [Install]
f9a9f5
 WantedBy= mdmonitor.service
f9a9f5
+Also= mdcheck_continue.timer
f9a9f5
-- 
f9a9f5
2.7.5
f9a9f5