]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: allow to assemble container with uuid=0:0:0:0
authorCzarnowska, Anna <anna.czarnowska@intel.com>
Mon, 31 Jan 2011 23:40:56 +0000 (10:40 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 23:40:56 +0000 (10:40 +1100)
When there are any arrays in config file the spares with
domain not matching any array are not assembled because
auto assembly is not attempted.
Addition of ARRAY line with uuid=0:0:0:0 in config will work
with modified condition for gathering spares.

Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 532335e7779acb50053b152da2942960a8de0caf..36fd4b7afb25a5fc344d54bbcaf4f8d7069203f1 100644 (file)
@@ -564,7 +564,10 @@ int Assemble(struct supertype *st, char *mddev,
        }
 
        /* Check if we found some imsm spares but no members */
-       if (auto_assem && (!st || !st->sb))
+       if ((auto_assem ||
+            (ident->uuid_set &&
+             memcmp(uuid_zero, ident->uuid,sizeof(uuid_zero)) == 0)) &&
+           (!st || !st->sb))
                for (tmpdev = devlist; tmpdev; tmpdev = tmpdev->next) {
                        if (tmpdev->used != 3)
                                continue;