From e5329c3747a4e9eb7addbfaa59b8d5e8688ce2a1 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 11 Aug 2004 02:16:01 +0000 Subject: mdadm-1.7.0 --- Monitor.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Monitor.c') diff --git a/Monitor.c b/Monitor.c index 021a967..ce0087c 100644 --- a/Monitor.c +++ b/Monitor.c @@ -163,6 +163,7 @@ int Monitor(mddev_dev_t devlist, } else { mddev_dev_t dv; for (dv=devlist ; dv; dv=dv->next) { + mddev_ident_t mdlist = conf_get_ident(config, dv->devname); struct state *st = malloc(sizeof *st); if (st == NULL) continue; @@ -174,6 +175,11 @@ int Monitor(mddev_dev_t devlist, st->percent = -2; st->expected_spares = -1; st->spare_group = NULL; + if (mdlist) { + st->expected_spares = mdlist->spare_disks; + if (mdlist->spare_group) + st->spare_group = strdup(mdlist->spare_group); + } statelist = st; } } @@ -216,7 +222,8 @@ int Monitor(mddev_dev_t devlist, close(fd); continue; } - if (array.level != 1 && array.level != 5 && array.level != -4) { + if (array.level != 1 && array.level != 5 && array.level != -4 && + array.level != 6 && array.level != 10) { if (!st->err) alert("DeviceDisappeared", dev, "Wrong-Level", mailaddr, alert_cmd); -- cgit