On 3/11/2020 11:53 PM, Ram Ramesh wrote:
This may be a silly question, but is email working in your system?
It's not a silly question, but I believe I already answered it.
Yes, email is working, and yes, mdadm is able to send messages. It
complains every morning at 07:35 if one f the arrays is degraded, and
the test function works.
I run debian, but a different version. Cron only sends me a message
when something is wrong. I mean if checkarray failed, I get a message.
If my array is degraded, I get a message. If everything is fine, no
message. May be that is the standard. I am not the authority, but that
is what is happening in my system.
I don't believe cron sends the messages for the array redundancy
check, since they are sent roughly every 20% of the sync task, not on
any particular time schedule. Of course, the status check is run by
some timer, and cron could certainly handle such a task on a
minute-by-minute basis, but I don't see any cron task related to the
array structure other than /etc/cron.d/mdadm, which is the checkarray
task itself, run once a month.
I believe cron emails stdout+stderr of the command run. May be
checkarray does not output anything in a successful run and therefore
no email.
Checkarray normally doesn't output anything when run fro, the cron
task, which employs the --quiet switch, nor does cron if checkarray is
successful. It merely initiates the check action on every specified
array and exits. Something else - presumably mdadm - sends an email as
the array check proceeds every 20%.
It is best to also query debian.user email: debian-user@xxxxxxxxxxxxxxxx
I will try querying the Debian list, but while the cron job was
a Debian feature, I don't believe this issue is one with Debian, per se.
Ramesh
On 3/11/20 8:41 PM, Leslie Rhorer wrote:
Aha! There it is, on both the old and new systems, so it probably
is running. The question remains, "Why isn't it posting to email?"
On 3/11/2020 7:50 AM, Brad Campbell wrote:
On 11/3/20 09:11, Leslie Rhorer wrote:
Is there seriously no one here who knows how checkarray was
launched in previous versions?
On 3/1/2020 3:03 PM, Leslie Rhorer wrote:
I have upgraded 2 of my servers to Debian Buster, and now
neither one seems to be running checkarray automatically. In
addition, when I run checkarray manually, it isn't sending update
emails on the status of the job. Actually, I have never been able
to figure out how checkarray runs. One my older servers, there
doesn't seem to be anything in /etc/crontab, /etc/cron.monthly,
/etc/init.d/, /etc/mdadm/mdadm.conf, or /lib/systemd/system/ that
would run checkarray.
On mine it's in /etc/cron.d/mdadm
brad@srv:/etc/cron.d$ cat mdadm
#
# cron.d/mdadm -- schedules periodic redundancy checks of MD devices
#
# Copyright © martin f. krafft <madduck@xxxxxxxxxxx>
# distributed under the terms of the Artistic Licence 2.0
#
# By default, run at 00:57 on every Sunday, but do nothing unless
the day of
# the month is less than or equal to 7. Thus, only run on the first
Sunday of
# each month. crontab(5) sucks, unfortunately, in this regard;
therefore this
# hack (see #380425).
57 0 * * 0 root if [ -x /usr/share/mdadm/checkarray ] && [ $(date
+\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --idle
--quiet; fi
dpkg -L mdadm gave me a list of files and I just checked the cron
entries.
I don't run anything that recent, but Debian is Debian.
Brad