summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2010-04-08 17:34:47 -0400
committerDoug Ledford <dledford@redhat.com>2010-04-13 15:05:36 -0400
commit0688fd7f66c51510cc32a09bc8b66f9fbed8cf34 (patch)
tree0ba407c6802e6c25173e97a224efdfb3ec65133f
parente8bf7042ed064590abf44b61ad8d99b1592c0af4 (diff)
downloadmdadm-0688fd7f66c51510cc32a09bc8b66f9fbed8cf34.tar.gz
mdadm-0688fd7f66c51510cc32a09bc8b66f9fbed8cf34.tar.xz
mdadm-0688fd7f66c51510cc32a09bc8b66f9fbed8cf34.zip
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>
-rw-r--r--Assemble.c7
1 files changed, 5 insertions, 2 deletions
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",