dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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