1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

lvconvert: add missing alias for a thin-pool conversion

The case of converting a cache volume to a thin pool missed
recognizing the --thinpool alias for --type thin-pool.
This commit is contained in:
David Teigland 2016-06-30 10:09:54 -05:00
parent 802ed9d459
commit a8e39530ef

View File

@ -3718,9 +3718,13 @@ static int _convert_cache_volume(struct cmd_context *cmd, struct logical_volume
if (arg_is_set(cmd, splitmirrors_ARG))
return _convert_cache_volume_splitmirrors(cmd, lv, lp);
if (new_type && !strcmp(new_type, "thin-pool"))
/* The --thinpool alias is ambiguous and not preferred. */
if ((new_type && !strcmp(new_type, "thin-pool")) || arg_is_set(cmd, thinpool_ARG))
return _convert_cache_volume_thin_pool(cmd, lv, lp);
/* The --thinpool alias for --type thin-pool is not preferred, so not shown. */
log_error("Operation not permitted on cache LV %s", display_lvname(lv));
log_error("Operations permitted on a cache LV are:\n"
" --splitcache\n"