diff --git a/WHATS_NEW b/WHATS_NEW index a9aa152ee..dbd59bfc7 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Allow lvconvert --stripes/stripesize only with --mirrors/--repair/--thinpool. Fix memleak in device_is_usable mirror testing function. Do not ignore -f in lvconvert --repair -y -f for mirror and raid volumes. Disallow pvmove on RAID LVs until they are addressed properly diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in index 4fe9bddf4..578047b3e 100644 --- a/man/lvconvert.8.in +++ b/man/lvconvert.8.in @@ -61,6 +61,10 @@ lvconvert \- convert a logical volume from linear to mirror or snapshot .sp .B lvconvert \-\-repair .RB [ \-h | \-? | \-\-help ] +.RB [ \-\-stripes +.I Stripes +.RB [ \-I | \-\-stripesize +.IR StripeSize ]] .RB [ \-v | \-\-verbose ] .RB [ \-\-version ] .IR LogicalVolume [ Path ] @@ -274,7 +278,8 @@ This option is only available to RAID segment types .BR \-\-stripes " " \fIStripes Gives the number of stripes. This is equal to the number of physical volumes to scatter -the logical volume. +the logical volume. This does not apply to existing allocated +space, only newly allocated space can be striped. .TP .BR \-I ", " \-\-stripesize " " \fIStripeSize Gives the number of kilobytes for the granularity of the stripes. diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 2d51069eb..9c947d7fd 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -167,6 +167,14 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd, return 0; } + if ((arg_count(cmd, stripes_long_ARG) || arg_count(cmd, stripesize_ARG)) && + !(arg_count(cmd, mirrors_ARG) || arg_count(cmd, repair_ARG) || + arg_count(cmd, thinpool_ARG))) { + log_error("--stripes or --stripesize argument is only valid " + "with --mirrors, --repair or --thinpool"); + return 0; + } + if (!arg_count(cmd, background_ARG)) lp->wait_completion = 1;