diff --git a/WHATS_NEW b/WHATS_NEW index 047e2eda1..211d1bb26 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.98 - ================================= + Prohibit usage of lvcreate --thinpool with --mirrors. Fix lvm2api origin reporting for thin snapshot volume. Add configure --enable-python_bindings for liblvm2app to new python subdir. Add implementation of lvm2api function lvm_percent_to_float. diff --git a/test/shell/lvcreate-thin.sh b/test/shell/lvcreate-thin.sh index 6f609760c..8ac54687c 100644 --- a/test/shell/lvcreate-thin.sh +++ b/test/shell/lvcreate-thin.sh @@ -174,14 +174,18 @@ not lvcreate -L4M --chunksize 2G -T $vg/pool1 lvcreate -L4M -V2G --name lv1 -T $vg/pool1 # Origin name is not accepted not lvcreate -s $vg/lv1 -L4M -V2G --name $vg/lv4 -vgremove -ff $vg +# Check we cannot create mirror and thin or thinpool together +not lvcreate -T mirpool -L4M --alloc anywhere -m1 $vg +not lvcreate --thinpool mirpool -L4M --alloc anywhere -m1 $vg + +vgremove -ff $vg # Test --poolmetadatasize range # allocating large devices for testing aux teardown_devs aux prepare_pvs 10 16500 -vgcreate $clustered $vg -s 64K $(cat DEVICES) +vgcreate $vg -s 64K $(cat DEVICES) lvcreate -L4M --chunksize 128 --poolmetadatasize 0 -T $vg/pool1 2>out grep "WARNING: Minimum" out diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 7d016856c..53c49406e 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -694,8 +694,9 @@ static int _lvcreate_params(struct lvcreate_params *lp, * Check selected options are compatible and determine segtype */ // FIXME -m0 implies *striped* - if (arg_count(cmd, thin_ARG) && arg_count(cmd,mirrors_ARG)) { - log_error("--thin and --mirrors are incompatible."); + if ((arg_count(cmd, thin_ARG) || arg_count(cmd, thinpool_ARG)) && + arg_count(cmd,mirrors_ARG)) { + log_error("--thin,--thinpool and --mirrors are incompatible."); return 0; }