diff options
author | NeilBrown <neilb@suse.de> | 2012-06-04 12:52:36 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-09-27 16:49:54 +1000 |
commit | 5f862fb9c3a80581eaa79efdbe9bc2ba0755b4f8 (patch) | |
tree | 306e43c7405d17a732b467289bf6ff05d53cfb44 | |
parent | fcf2195994b2ee8b0032e8493c64fc15cddfe9f7 (diff) | |
download | mdadm-5f862fb9c3a80581eaa79efdbe9bc2ba0755b4f8.tar.gz |
Monitor: Report NewArray when an array the disappeared, reappears.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | Monitor.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -518,6 +518,13 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, * just make sure it is always different. */ array.utime = st->utime + 1;; + if (st->err) { + /* New array appeared where previously had and error */ + st->err = 0; + st->percent = RESYNC_NONE; + alert("NewArray", st->devname, NULL, ainfo); + } + if (st->utime == array.utime && st->failed == array.failed_disks && st->working == array.working_disks && @@ -526,7 +533,6 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, mse->percent == st->percent ))) { close(fd); - st->err = 0; if ((st->active < st->raid) && st->spare == 0) return 1; else @@ -719,7 +725,6 @@ static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist, *statelist = st; if (test) alert("TestMessage", st->devname, NULL, info); - alert("NewArray", st->devname, NULL, info); new_found = 1; } return new_found; |