From: Martin Wilck Date: Wed, 13 Aug 2025 17:28:08 +0000 (+0200) Subject: systemd: use "Type=simple" for mdcheck services X-Git-Tag: mdadm-4.5~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=191957c3e4f8bcc3fdc251067e523732749f75cd;p=thirdparty%2Fmdadm.git systemd: use "Type=simple" for mdcheck services "Type=oneshot" means that systemd considers the unit as started when the started process exits. But the "mdcheck" script may run for several hours. Thus systemd will regard the unit as "activating" all the time. This can be easily tested by running "systemctl start mdcheck_start.service" manually. The systemctl command will not finish until the mdcheck utility has finished or Ctrl-C is typed, which is broken. Use "Type=simple" instead. Signed-off-by: Martin Wilck --- diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service index 70892a1f..cd12db85 100644 --- a/systemd/mdcheck_continue.service +++ b/systemd/mdcheck_continue.service @@ -11,6 +11,6 @@ ConditionPathExistsGlob=/var/lib/mdcheck/MD_UUID_* Documentation=man:mdadm(8) [Service] -Type=oneshot +Type=simple Environment="MDADM_CHECK_DURATION=6 hours" ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION} diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service index fc4fc438..16ba6b67 100644 --- a/systemd/mdcheck_start.service +++ b/systemd/mdcheck_start.service @@ -11,6 +11,6 @@ Wants=mdcheck_continue.timer Documentation=man:mdadm(8) [Service] -Type=oneshot +Type=simple Environment="MDADM_CHECK_DURATION=6 hours" ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}