Quote:
Originally Posted by granth
The default poll interval is 60 seconds.
|
Yeah but you need to specify -d for that feature to be true?
I tried vulcan's method, with this test:
Code:
mdadm /dev/md0 --fail /dev/sda1
mdadm /dev/md0 --remove /dev/sda1
mdadm /dev/md0 --add /dev/sda1
it sent an email. Why rc.mdadm wont send an email?
the command that starts mdadm in rc.mdadm is simply:
Code:
start() {
if [ "X${MDPID}" = "X" ];then
${PROG} --monitor --daemonise "${DEVICES}" > ${PIDFILE}
else
echo "Mdadm Monitor already running :"
exit 1
fi
}
with
Code:
PIDFILE="/var/run/mdadm"
CONFIG="/etc/mdadm.conf"
PROG="/sbin/mdadm"
DEVICES="/dev/md[0-9]"
Basically, rc.mdadm's command is:
Code:
/sbin/mdadm --monitor --daemonise /dev/md[0-9]
And you guys are using these commands:
Code:
/sbin/mdadm -F --scan -m dave@pc1 -f -d 600
/sbin/mdadm --monitor --scan -f -d 120
Regorganized, these commands are exactly the same, with the exception that the command in rc.mdadm does not scan or specify an email address since it relies on mdadm.conf to be populated and also that you guys are specifying the poll time. If mdadm polling defaults to 60sec then these commands are all the same...
I'm puzzled... Why wouldnt I receive an email with rc.mdadm's command??