Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: [gentoo-user] mdadm --monitor & email
Date: Sun, 13 Feb 2011 16:07:03
Message-Id: AANLkTikBiZXo4ann7vWb7r86q7QhvogDtdPhEkXKW1CO@mail.gmail.com
1 Hi,
2 I'm curious about setting up my compute server to monitor RAID
3 array status and have it email me information at my GMail account.
4 Does anyone have info on setting this up on Gentoo? In general I'm
5 following:
6
7 http://en.gentoo-wiki.com/wiki/RAID/Software
8
9 but it seems there are a few holes in my understanding.
10
11 1) In the /etc/mdadm.conf file I see the following:
12
13 #
14 # When used in --follow (aka --monitor) mode, mdadm needs a
15 # mail address and/or a program. This can be given with "mailaddr"
16 # and "program" lines to that monitoring can be started using
17 # mdadm --follow --scan & echo $! > /var/run/mdadm
18 # If the lines are not found, mdadm will exit quietly
19 #MAILADDR root@××××××××.tld
20 #PROGRAM /usr/sbin/handle-mdadm-events
21
22 - Easy enough to change my email address, but how does it get mailed?
23 Is this what ssmtp is for? ssmtp is installed as a dependency of sudo,
24 but I don't use it explicitly. Do I have to have a real domain in my
25 name to get GMail to accept this?
26
27 - Currently have have no program called
28 /usr/sbin/handle-mdadm-events. Is this just a placeholder for whatever
29 program I choose as a mailer, or is this intended as some program that
30 takes real action in case of a problem?
31
32 2) I'm making the assumption that running rc-update add mdadm boot, as
33 shown in the link above, is the way to get this started once
34 configured properly?
35
36 3) I note that the test command listed in the link above doesn't work:
37
38 c2stable ~ # mdadm -Fslt
39 mdadm: option -l not valid in monitor mode
40 c2stable ~ #
41
42 4) Assuming I do get this working, while testing can i have the
43 program email me every 60 minutes whether things are good or bad, just
44 to test that it's actually working and getting results?
45
46 Thanks,
47 Mark

Replies

Subject Author
Re: [gentoo-user] mdadm --monitor & email Michael Orlitzky <michael@××××××××.com>