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

27 lines
935 B
Diff

commit 3e77dfbe97a30d97c42787b15e7a9c703fda0431
Author: Doug Ledford <dledford@redhat.com>
Date: Thu Apr 8 17:10:08 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..9580066 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1337,8 +1337,9 @@ 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");
break;
default:
err = sysfs_set_str(content, NULL, "array_state",