1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: prohibit lvcreate --thinpool with mirrors

Disable --thinpool to be used with mirror on lvcreate.
This commit is contained in:
Zdenek Kabelac 2012-10-12 12:18:06 +02:00
parent be291e1064
commit 3058f662cf
3 changed files with 10 additions and 4 deletions

View File

@ -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.

View File

@ -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

View File

@ -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;
}