diff options
author | Marian Csontos <mcsontos@redhat.com> | 2017-08-22 11:52:15 +0200 |
---|---|---|
committer | Marian Csontos <mcsontos@redhat.com> | 2017-08-22 14:45:37 +0200 |
commit | 445e9c48f87cb58c705b467e3c8a2354dde8eaa8 (patch) | |
tree | e1eb9dde497263325225cad404ff7e73a9a8ad15 | |
parent | df5c2964269895b6f5ce16dbdb70edd57c5aa67d (diff) | |
download | lvm2-445e9c48f87cb58c705b467e3c8a2354dde8eaa8.tar.gz |
raid: stripes option is not allowed with RAID1
-rw-r--r-- | tools/lvconvert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 94dee9d32..4ca44763d 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -209,10 +209,11 @@ static int _read_params(struct cmd_context *cmd, struct lvconvert_params *lp) lp->type_str = SEG_TYPE_NAME_STRIPED; if ((arg_is_set(cmd, stripes_long_ARG) || arg_is_set(cmd, stripesize_ARG)) && - !(_mirror_or_raid_type_requested(cmd, lp->type_str) || _striped_type_requested(lp->type_str) || + !((_mirror_or_raid_type_requested(cmd, lp->type_str) && strcmp(lp->type_str, SEG_TYPE_NAME_RAID1)) || + _striped_type_requested(lp->type_str) || _raid0_type_requested(lp->type_str) || arg_is_set(cmd, thinpool_ARG))) { log_error("--stripes or --stripesize argument is only valid " - "with --mirrors/--type mirror/--type raid*/--type striped/--type linear, --repair and --thinpool"); + "with --mirrors/--type mirror/--type raid{4,5,6,10}/--type striped/--type linear, --repair and --thinpool"); return 0; } |