Ow Mun Heng
2008-Jun-11 04:11 UTC
[CentOS] mdmonitor not triggering program on fail events
Hi, Can anyone help me with this since I want to get it done "the correct way" I'm trying to make mdmonitor to execute a program when it detects a fail event automatically. Currently, from what I see, init is calling mdmonitor with these options mdadm --monitor --scan -f (note that the --program is not there) and this is in my /etc/mdadm.conf MAILADDR root PROGRAM /root/program_2_run.sh short of hacking the mdmonitor script to hardcode the program there, is there an alternate, more elegant way? Thanks.
Ow Mun Heng
2008-Jun-12 01:25 UTC
[CentOS] mdmonitor not triggering program on fail events
No One has any clues?? On Wed, 2008-06-11 at 12:11 +0800, Ow Mun Heng wrote:> Hi, > > Can anyone help me with this since I want to get it done "the correct > way" > > I'm trying to make mdmonitor to execute a program when it detects a fail > event automatically. > > Currently, from what I see, init is calling mdmonitor with these options > > mdadm --monitor --scan -f > > (note that the --program is not there) > > and this is in my /etc/mdadm.conf > > MAILADDR root > PROGRAM /root/program_2_run.sh > > short of hacking the mdmonitor script to hardcode the program there, is > there an alternate, more elegant way? > > Thanks. > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
Ralph Angenendt
2008-Jun-12 08:11 UTC
[CentOS] mdmonitor not triggering program on fail events
Ow Mun Heng wrote:> Currently, from what I see, init is calling mdmonitor with these options > > mdadm --monitor --scan -f > > (note that the --program is not there) > > and this is in my /etc/mdadm.conf > > MAILADDR root > PROGRAM /root/program_2_run.sh > > short of hacking the mdmonitor script to hardcode the program there, is > there an alternate, more elegant way?What's not elegant about that? Sure, an /etc/sysconfig/mdmonitor would probably have been better, but it scans the config file for MAIL and PROGRAM being in it and would stop otherwise. Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20080612/84256953/attachment-0002.sig>
Ow Mun Heng
2008-Jun-12 08:29 UTC
[CentOS] mdmonitor not triggering program on fail events
On Thu, 2008-06-12 at 10:11 +0200, Ralph Angenendt wrote:> Ow Mun Heng wrote: > > Currently, from what I see, init is calling mdmonitor with these options > > > > mdadm --monitor --scan -f > > > > (note that the --program is not there) > > > > and this is in my /etc/mdadm.conf > > > > MAILADDR root > > PROGRAM /root/program_2_run.sh > > > > short of hacking the mdmonitor script to hardcode the program there, is > > there an alternate, more elegant way? > > What's not elegant about that? Sure, an /etc/sysconfig/mdmonitor would > probably have been better, but it scans the config file for MAIL and > PROGRAM being in it and would stop otherwise.Yeah, it scans for either mail OR program being in there but for some obscure reason, (or perhaps I just don't get how it works) the PROGRAM to be ran isn't being called out by the mdmonitor init script and I'm not sure why. The only thing which I can see is that the option --program is not mentioned