Skip to Content
Managing RAID on Linux
book

Managing RAID on Linux

by Derek Vadala
December 2002
Intermediate to advanced content levelIntermediate to advanced
260 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Managing RAID on Linux

Name

Monitor mode

Synopsis

mdadm --monitor mddevice [options]

Monitor, or Follow, mode allows administrators to configure email notification, set up event handling, and share spare disks between arrays.

Options

-F, --follow, --monitor

Enables Follow mode for the specified array(s). mdadm will not exit when Follow mode is invoked. Instead, it polls arrays and monitors for critical events. Run mdadm in the background as necessary.

-m, --mail=

Sets the email address to notify when a failure event occurs. Example: -mderek or --mail=derek.

-p, --program=, --alert=

Executes the specified program when an event occurs. You can create homegrown scripts to help mdadm monitor and manage arrays. Examples of these options include -pmymdmonitor.sh or --program=/usr/local/sbin/mymdmonitor.pl.

-d, --delay=

Changes the number of seconds to wait between polling arrays (for example, -d30 or --delay=30 for thirty seconds). The default is one minute.

-s, --scan

When used in Monitor mode, consults /etc/mdadm.conf for a MAILADDR line that indicates where to email results, and for a PROGRAM line that indicates what program to run, instead of taking those pieces of information from the command line.

Example usage

When monitor mode is invoked, mdadm will not exit, so it’s a good idea to run it in the background and redirect its output to a file that you can examine. The following example polls /dev/md1 every sixty seconds (the default) and sends critical event notifications to root:

# nohup mdadm --monitor /dev/md1 --mail=root ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux: Powerful Server Administration

Linux: Powerful Server Administration

Uday Sawant, Oliver Pelz, Jonathan Hobson, William Leemans
Linux Security Cookbook

Linux Security Cookbook

Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9780596802035Errata Page