]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: allow "--add" with "--grow --level=??"
authorNeilBrown <neilb@suse.de>
Mon, 24 Jun 2013 06:13:00 +0000 (16:13 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Jun 2013 06:13:00 +0000 (16:13 +1000)
This is useful for reshaping a RAID0 to a higher level.
The recovery will happen at the same time as the reshape.

Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.c

diff --git a/mdadm.c b/mdadm.c
index 14005b3e25a70860f4bbbb695feb2a5282467e36..a46a716b29617014aeb6aab83698ce465467f3e5 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -1490,7 +1490,7 @@ int main(int argc, char *argv[])
                                break;
                        }
                }
-               if (devs_found > 1 && s.raiddisks == 0) {
+               if (devs_found > 1 && s.raiddisks == 0 && s.level == UnSet) {
                        /* must be '-a'. */
                        if (s.size > 0 || s.chunk || s.layout_str != NULL || s.bitmap_file) {
                                pr_err("--add cannot be used with "