summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-07-29 13:37:42 +1000
committerNeilBrown <neilb@suse.de>2014-07-29 13:37:42 +1000
commit46643e1ad5ece5f1257b2d827e36231df44929a2 (patch)
tree09ed3faf0da9ab6b7fcd3241b1f3b1b7df69475b
parent4e9a3dd16d656b269f5602624ac4f7109a571368 (diff)
Grow: improve error message is "--grow -n2" used on Linear arrays.
Linear arrays don't respond to setting raid-disks, only to adding a device. Reported-by: mulhern Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1122146 Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--Grow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Grow.c b/Grow.c
index af59347c..a9c8589c 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1028,7 +1028,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
switch (info->array.level) {
default:
- return "Cannot understand this RAID level";
+ return "No reshape is possibly for this RAID level";
+ case LEVEL_LINEAR:
+ if (info->delta_disks != UnSet)
+ return "Only --add is supported for LINEAR, setting --raid-disks is not needed";
+ else
+ return "Only --add is supported for LINEAR, other --grow options are not meaningful";
case 1:
/* RAID1 can convert to RAID1 with different disks, or
* raid5 with 2 disks, or