diff options
author | Neil Brown <neilb@suse.de> | 2003-10-29 00:20:01 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2003-10-29 00:20:01 +0100 |
commit | feb716e9c3568a45b8815bf2c59e417d30635f89 (patch) | |
tree | 0f8e3d3ad2ba688cf70c7655e86566a5fa27e753 /Monitor.c | |
parent | mdadm-1.3.0 (diff) | |
download | mdadm-feb716e9c3568a45b8815bf2c59e417d30635f89.tar.xz mdadm-feb716e9c3568a45b8815bf2c59e417d30635f89.zip |
mdadm-1.4.0mdadm-1.4.0
Diffstat (limited to 'Monitor.c')
-rw-r--r-- | Monitor.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -97,6 +97,7 @@ int Monitor(mddev_dev_t devlist, int err; char *spare_group; int active, working, failed, spare, raid; + int expected_spares; int devstate[MD_SB_DISKS]; int devid[MD_SB_DISKS]; int percent; @@ -151,6 +152,7 @@ int Monitor(mddev_dev_t devlist, st->err = 0; st->devnum = -1; st->percent = -2; + st->expected_spares = mdlist->spare_disks; if (mdlist->spare_group) st->spare_group = strdup(mdlist->spare_group); else @@ -169,6 +171,7 @@ int Monitor(mddev_dev_t devlist, st->err = 0; st->devnum = -1; st->percent = -2; + st->expected_spares = -1; st->spare_group = NULL; statelist = st; } @@ -248,6 +251,10 @@ int Monitor(mddev_dev_t devlist, ) alert("DegradedArray", dev, NULL, mailaddr, alert_cmd); + if (st->utime == 0 && /* new array */ + st->expected_spares > 0 && + array.spare_disks < st->expected_spares) + alert("SparesMissing", dev, NULL, mailaddr, alert_cmd); if (mse && st->percent == -1 && mse->percent >= 0) |