]> sourceware.org Git - lvm2.git/commitdiff
lvconvert: Improve error message when no -m.
authorAlasdair G Kergon <agk@redhat.com>
Wed, 3 Aug 2016 22:31:50 +0000 (23:31 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 3 Aug 2016 22:43:59 +0000 (23:43 +0100)
tools/lvconvert.c

index b365049967018b3931745f0be9e8935ab5cfd665..0aac89e26c7b6c71cc96e0b111f0912c87b141e6 100644 (file)
@@ -1853,7 +1853,12 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
        }
 
        if (seg_is_linear(seg) && !lp->merge_mirror && !lp->mirrors_supplied) {
-               log_error("Raid conversions require -m/--mirrors.");
+               if (_raid0_type_requested(lp->type_str))
+                       log_error("Linear LV %s cannot be converted to %s.",
+                                 display_lvname(lv), lp->type_str);
+               else
+                       log_error("Raid conversions of LV %s require -m/--mirrors.",
+                                 display_lvname(lv));
                goto try_new_takeover_or_reshape;
        }
 
This page took 0.04606 seconds and 5 git commands to generate.