summaryrefslogtreecommitdiffstats
path: root/Monitor.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix for segfault when reading /proc/mdstatNeil Brown2008-04-281-0/+1
| | | | | | | | | Some kernel versions don't put a space between 'active' and '(auto-read-only)' in /proc/mdstat. This causes a parsing problem leaving 'level' set to NULL which causes a crash. So synthesise a space there if it is missing, and check for 'level' to be NULL and don't de-ref if it is.
* Replace sysarray with mdinfoNeil Brown2007-12-141-1/+1
| | | | | Sure, mdinfo is bigger, but having a uniform structure for lots of things will make life easier.
* Remove spaces/tabs from ends of lines.Neil Brown2007-12-141-9/+9
|
* Monitor.c s/MAXINT/INT_MAX/gmaximilian attems2007-09-271-6/+6
| | | | | | | include limits.h directly instead of values.h Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* Monitor.c include signal.h directlymaximilian attems2007-09-271-1/+1
| | | | | | | another small step for better klibc support, glibc compile tested. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* Enhance raid4 support: --assemble and --monitor wasn't quite happy with it.Doug Ledford2007-07-091-5/+6
| | | | | | | | | | | | | | | | | | | | | | | From: Doug Ledford <dledford@redhat.com> This one actually does a couple things. Mainly related to raid4, but kinda touches other raid levels some. When creating a raid4 array, treat it like a raid5 array in that we create it in degraded mode by default and add the last disk as a spare. Besides speeding things up, this has a second effect that it makes mdadm more consistent. In order to create a degraded raid5 array, you need only passing missing as one of the devices. For a degraded raid4 array, prior to this patch, you must pass assume-clean or else it refuses to create the array. Even force won't make it work without assume-clean. With the patch, raid4 behaves identical to raid5. Separate from that, the monitor functionality completely ignores raid4 arrays. That seems to stem from the code that checks to see if the array is part of a long list of types. It seems easier to check which array types *aren't* redundant instead of listing the ones that are redundant and missing some of them. This makes the monitor service actually watch raid4 arrays.
* Mark some files FD_CLOEXEC to protect sendmail from them.Doug Ledford2007-07-091-0/+1
| | | | | | | | | | | From: Doug Ledford <dledford@redhat.com> When running with SELinux enabled and using mdadm to monitor devices, attempts to send emails to an admin will be blocked because mdadm is holding open /proc/mdstat without setting the FD_CLOEXEC flag. As a result, sendmail has an open descriptor to /proc/mdstat after the popen() call, which SELinux decides isn't really any of sendmail's business and so sendmail gets denied.
* Fix spare migration and other problems with --monitor.Neil Brown2007-07-091-0/+1
| | | | | 2.6 broke --monitor in various ways, including spare migration stopped working. This fixes it.
* Fix a bug that was causing incorrect warning from --monitor.Neil Brown2007-02-221-1/+1
|
* Release 2.6mdadm-2.6Neil Brown2006-12-211-1/+1
|
* Add new mode: --incrementalNeil Brown2006-12-211-1/+1
| | | | | --incremental allows arrays to be assembled one device at a time. This is expected to be used with udev.
* Don't hold md device open for so long in --monitor modeNeil Brown2006-12-141-4/+20
| | | | map_dev can be slow and interferes with trying to stop the array.
* When resync finished, report the mismatch count if there is one.Neil Brown2006-12-141-3/+19
| | | | | This doesn't get mailed out, but will appear in syslog... Maybe it should be mailed if it was a 'check' or 'repair' pass...
* --wait or -W will wait for resync activity to finish on the given devices.Neil Brown2006-12-141-0/+35
|
* More consistent honoring of --configfileNeil Brown2006-06-261-6/+6
| | | | | Never use /etc/mdadm.conf if --config file is given (previously some code used one, some used the other).
* Fix user-after-free bug in error path in --monitor mode.Neil Brown2006-06-261-1/+1
|
* Fix typo in mail message from --monitorNeil Brown2006-06-021-1/+1
| | | | | | From: martin f krafft <madduck@madduck.net> Signed-off-by: Neil Brown <neilb@suse.de>
* check return status of all write/fwrite functions as required by glibc 2.4Neil Brown2006-05-291-1/+1
| | | | | | | | | | | | From: Luca Berra <bluca@vodka.it> glibc 2.4 is pedantic on ignoring return values from fprintf, fwrite and write, so now we check the rval and actually do something with it. in the Grow.c case i only print a warning, since i don't think we can do anything in case we fail invalidating those superblocks (is should never happen, but then...) Signed-off-by: Neil Brown <neilb@suse.de>
* Choose better devnumbers and tidy up some issues with finding names.Neil Brown2006-05-261-0/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Just updaqte copyright dates and email addressNeil Brown2006-05-191-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Add a copy of /proc/mdstat to the mail message send by mdadm --monitor.Neil Brown2006-05-191-0/+11
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Arrange that SparesMissing events generate an email too.Neil Brown2006-05-151-1/+3
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support 'mailfrom' line in mdadm.conf so the From: line in alert emails can ↵Neil Brown2006-05-151-18/+24
| | | | | | be explicitly set. Signed-off-by: Neil Brown <neilb@suse.de>
* Reduce dependance on MD_SB_DISKSNeil Brown2006-03-281-7/+17
| | | | | | --monitor should now work with arrays larger than 28 devices. Signed-off-by: Neil Brown <neilb@suse.de>
* Create missing /dev files where needed.Neil Brown2006-03-281-2/+2
| | | | | | | Whenever we need a device file to open, if one cannot be found in /dev, create a temporary one. Signed-off-by: Neil Brown <neilb@suse.de>
* Sort mdstat entries so that composites are well-ordered.Neil Brown2006-01-311-1/+1
| | | | | | | This means that "-Ds" lists arrays in an approprate order for assembly. Signed-off-by: Neil Brown <neilb@suse.de>
* syslog support for monitor modeNeil Brown2005-12-051-18/+45
| | | | | | | | | | | | From: ross@jose.lug.udel.edu (Ross Vandegrift) Hi Neil, While adding the text message mode, I saw a FIXME asking for syslog support in monitor mode. This patch adds exactly that. Signed-off-by: Neil Brown <neilb@suse.de>
* Report which device failed in a Fail message.Neil Brown2005-12-051-0/+3
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Change MAJOR() etc to major() etcNeil Brown2005-04-041-5/+5
| | | | | | | | | This allows for larger device number if glibc supports it (requires 2.3.3). Also fail before creating larger device number if glibc support isn't present. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* mdadm-1.8.0mdadm-1.8.0Neil Brown2004-11-011-2/+15
|
* mdadm-1.7.0mdadm-1.7.0Neil Brown2004-08-111-1/+8
|
* mdadm-1.6.0mdadm-1.6.0Neil Brown2004-06-041-7/+10
|
* mdadm-1.5.0mdadm-1.5.0Neil Brown2004-01-221-15/+38
|
* mdadm-1.4.0mdadm-1.4.0Neil Brown2003-10-281-0/+7
|
* mdadm-1.3.0mdadm-1.3.0Neil Brown2003-07-281-4/+18
|
* mdadm-1.2.0mdadm-1.2.0Neil Brown2003-03-121-4/+6
|
* mdadm-1.1.0mdadm-1.1.0Neil Brown2003-03-021-6/+31
|
* mdadm-1.0.9mdadm-1.0.9Neil Brown2003-02-121-2/+14
|
* mdadm-0.8.2mdadm-0.8.2Neil Brown2002-04-111-1/+1
|
* mdadm-0.8mdadm-0.8Neil Brown2002-04-041-65/+235
|
* mdadm-0.7mdadm-0.7Neil Brown2002-03-081-2/+2
|
* mdctl-0.6mdctl-0.6Neil Brown2002-03-061-6/+14
|
* mdctl-0.5mdctl-0.5Neil Brown2001-08-231-0/+211