Re: How mdadm checks periodically the array in Debian 13 Trixie?
On 10/09/25 at 21:55, Andy Smith wrote:
$ systemctl list-units --all mdcheck*
UNIT LOAD ACTIVE SUB DESCRIPTION
mdcheck_continue.service loaded inactive dead MD array scrubbing - continuation
mdcheck_start.service loaded inactive dead MD array scrubbing
mdcheck_continue.timer loaded inactive dead MD array scrubbing - continuation
mdcheck_start.timer loaded active waiting MD array scrubbing
As before, the mdcheck_start timer is set to go off on the first Sunday
of the month, but you will see from:
$ systemctl cat mdcheck_start.service
that it is limited to a 6 hour run time, after which it is paused.
The mdcheck_continue timer and service resume the checks at certain
times on following days, until all checks are complete.
Thank you very much for your answers. I edited the mdcheck_start.timer
file using the command:
~$ sudo systemctl edit mdcheck_start.timer
it created the file:
~$ ls -l /etc/systemd/system/mdcheck_start.timer.d/override.conf
-rw-r--r-- 1 root root 185 11 set 15.00
/etc/systemd/system/mdcheck_start.timer.d/override.conf
I want the check to start on the first Monday of each month at 5pm, I
made these changes:
~$ cat /etc/systemd/system/mdcheck_start.timer.d/override.conf
[Unit]
Description=MD array scrubbing
[Timer]
OnCalendar=Mon *-*-1..7 17:00:00
RandomizedDelaySec=24h
Persistent=true
[Install]
WantedBy=mdmonitor.service
Also=mdcheck_continue.timer
Since the name of the file is "override.conf" I'm unsure that my changes
are correct. The only change I made is about the "OnCalendar" item and
everything else is copied from "mdcheck_start.timer". Now the "cat"
option of "systemctl" return:
~$ systemctl cat mdcheck_start.timer
# /usr/lib/systemd/system/mdcheck_start.timer
# This file is part of mdadm.
#
# mdadm is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
[Unit]
Description=MD array scrubbing
[Timer]
OnCalendar=Sun *-*-1..7 1:00:00
RandomizedDelaySec=24h
Persistent=true
[Install]
WantedBy=mdmonitor.service
Also=mdcheck_continue.timer
# /etc/systemd/system/mdcheck_start.timer.d/override.conf
[Unit]
Description=MD array scrubbing
[Timer]
OnCalendar=Mon *-*-1..7 17:00:00
RandomizedDelaySec=24h
Persistent=true
[Install]
WantedBy=mdmonitor.service
Also=mdcheck_continue.timer
therefore my new question is:
- Should the …/override.conf file contain only the line:
OnCalendar=Mon *-*-1..7 17:00:00
and not the other lines unchanged. Sorry but I'm new to Systemd's stuff.
Thanks in advance, kind regards.
--
Franco Martelli
Reply to: