Linux System Administration
Filesystems (Continued)
RAID Configuration - Monitoring Arrays
Using Follow/Monitor mode you can
daemonize mdadm
and configure it to send email alerts to system administrators when arrays encounter errors or fail.
You can also use Follow mode to arbitrarily execute commands when a disk fails.
For example, you might want to try removing and reinserting a failed disk in an attempt to correct a non-fatal failure without user intervention.
The following command will monitor /dev/md0 (polling every 300 seconds) for critical events.
When a fatal error occurs, mdadm will send an email to sysadmin.
You can tailor the polling interval and email address to meet your needs.
$ mdadm --monitor --mail=sysadmin --delay=300 /dev/md0
Note that when using monitor mode,
mdadm
will not exit, so you might want to wrap it around
nohup
and
ampersand
:
$ nohup mdadm --monitor --mail=sysadmin --delay=300 /dev/md0 &
Prev
Page 22
Next