diff --git a/mdadm-3.1.2-container-2.patch b/mdadm-3.1.2-container-2.patch new file mode 100644 index 0000000..5548944 --- /dev/null +++ b/mdadm-3.1.2-container-2.patch @@ -0,0 +1,26 @@ +commit 3e77dfbe97a30d97c42787b15e7a9c703fda0431 +Author: Doug Ledford +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 + +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",