summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2015-11-30 22:36:05 +0000
committerAlasdair G Kergon <agk@redhat.com>2015-11-30 22:36:05 +0000
commit46c8d6bb8ae91ee67c8633496cc6c3d92bb4f3ce (patch)
tree17bb7ed8c270a4cf6be52608523fc71e1dc0b6fd
parenteb22f7c8f7351a38fc4447f56ff588f497037c23 (diff)
downloadlvm2-46c8d6bb8ae91ee67c8633496cc6c3d92bb4f3ce.tar.gz
lvconvert: Improve message for raid without -m.
-rw-r--r--WHATS_NEW1
-rw-r--r--tools/lvconvert.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 0096d1e8b..d2bdb5874 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.137 -
=====================================
+ Avoid misleading error with -m is omitted with lvconvert to raid types.
Version 2.02.136 - 28th November 2015
=====================================
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 72be45b45..b309b9e80 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -242,9 +242,9 @@ static int _check_conversion_type(struct cmd_context *cmd, const char *type_str)
if (!type_str || !*type_str)
return 1;
- if (!strcmp(type_str, "mirror")) {
+ if (!strcmp(type_str, "mirror") || !strncmp(type_str, "raid", 4)) {
if (!arg_count(cmd, mirrors_ARG)) {
- log_error("--type mirror requires -m/--mirrors");
+ log_error("Mirror and raid conversions require -m/--mirrors");
return 0;
}
return 1;