mdadm/mdadm-3.1.2-container-2.patch
2010-04-08 21:35:28 +00:00

29 lines
959 B
Diff

commit e750ad9d6fbd4e6606681a9c81b9a99994255940
Author: Doug Ledford <dledford@redhat.com>
Date: Thu Apr 8 17:34:47 2010 -0400
Don't even try to activate non-redundant array types unless all disks
are present. This keeps arrays from getting marked as broken in
the superblock and then permanently blocked from being assembled.
Signed-off-by: Doug Ledford <dledford@redhat.com>
diff --git a/Assemble.c b/Assemble.c
index d059155..81178da 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1337,8 +1337,11 @@ int assemble_container_content(struct supertype *st, int mdfd,
case LEVEL_LINEAR:
case LEVEL_MULTIPATH:
case 0:
- err = sysfs_set_str(content, NULL, "array_state",
- "active");
+ if ((working + preexist) == content->array.raid_disks)
+ err = sysfs_set_str(content, NULL,
+ "array_state", "active");
+ else
+ err = 1;
break;
default:
err = sysfs_set_str(content, NULL, "array_state",