]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Monitor.c
Monitor: don't complain about non-monitorable arrays in mdadm.conf
[thirdparty/mdadm.git] / Monitor.c
index e6b054b51c7fa219bb0cc27246ec72ab52eb4ef3..a53a18cf73e8e69ff9ba1fc944dad2da87026af9 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -42,6 +42,7 @@ struct state {
        int err;
        char *spare_group;
        int active, working, failed, spare, raid;
+       int from_config;
        int expected_spares;
        int devstate[MaxDisks];
        dev_t devid[MaxDisks];
@@ -184,6 +185,7 @@ int Monitor(struct mddev_dev *devlist,
                        st->next = statelist;
                        st->devnum = INT_MAX;
                        st->percent = RESYNC_UNKNOWN;
+                       st->from_config = 1;
                        st->expected_spares = mdlist->spare_disks;
                        if (mdlist->spare_group)
                                st->spare_group = strdup(mdlist->spare_group);
@@ -483,7 +485,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
         * have a device disappear than all of them that can
         */
        if (array.level == 0 || array.level == -1) {
-               if (!st->err)
+               if (!st->err && !st->from_config)
                        alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
                st->err = 1;
                close(fd);