Gentoo Archives: gentoo-user

From: Michael Orlitzky <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mdadm --monitor & email
Date: Sun, 13 Feb 2011 19:13:18
Message-Id: 4D582A9D.2020308@orlitzky.com
In Reply to: Re: [gentoo-user] mdadm --monitor & email by Mark Knecht
1 On 02/13/2011 01:37 PM, Mark Knecht wrote:
2 >
3 > I'll read through the links you posted to look at creating a test
4 > case. From the page you posted above I'm trying this at the command
5 > line:
6 >
7 > mdadm --monitor --mail=markknecht@×××××.com --delay=1800 /dev/md126
8 >
9 > but I assume you think it won't do anything unless there's a problem
10 > found. Do those options properly belong in /etc/conf.d/mdadm.conf as
11 > the file itself seems to indicate?
12
13 I usually only define the MAILADDR in mdadm.conf. Everything else is
14 automagic. If you really need to mess with the delay, though, it would
15 go in /etc/conf.d/mdadm (you probably don't):
16
17 --delay
18 Give a delay in seconds. mdadm polls the md arrays and then waits
19 this many seconds before polling again. The default is 60
20 seconds. Since 2.6.16, there is no need to reduce this as the
21 kernel alerts mdadm immediately when there is any change.
22
23
24 > mark@c2stable ~ $ cat /etc/conf.d/mdadm
25 > # /etc/conf.d/mdadm: config file for /etc/init.d/mdadm
26 >
27 > # Misc options to pass to mdadm in monitor mode.
28 > # For more info, run `mdadm --monitor --help` or see
29 > # the mdadm(8) manpage.
30 >
31 > MDADM_OPTS="--syslog"
32 > mark@c2stable ~ $
33 >
34 > Also, I have many RAIDs. Do they all get appended to the same monitor
35 > command, or when started as a daemon does mdadm --monitor actually
36 > monitor all RAIDs? (If you know...)
37
38 If you run mdadm yourself, I think you need to either specify --scan or
39 enumerate the md devices yourself. The gentoo init script passes --scan
40 for you, though, so mdadm will figure out what md devices you have all
41 by itself.