mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
thin: prohibit lvcreate --thinpool with mirrors
Disable --thinpool to be used with mirror on lvcreate.
This commit is contained in:
parent
be291e1064
commit
3058f662cf
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.98 -
|
Version 2.02.98 -
|
||||||
=================================
|
=================================
|
||||||
|
Prohibit usage of lvcreate --thinpool with --mirrors.
|
||||||
Fix lvm2api origin reporting for thin snapshot volume.
|
Fix lvm2api origin reporting for thin snapshot volume.
|
||||||
Add configure --enable-python_bindings for liblvm2app to new python subdir.
|
Add configure --enable-python_bindings for liblvm2app to new python subdir.
|
||||||
Add implementation of lvm2api function lvm_percent_to_float.
|
Add implementation of lvm2api function lvm_percent_to_float.
|
||||||
|
@ -174,14 +174,18 @@ not lvcreate -L4M --chunksize 2G -T $vg/pool1
|
|||||||
lvcreate -L4M -V2G --name lv1 -T $vg/pool1
|
lvcreate -L4M -V2G --name lv1 -T $vg/pool1
|
||||||
# Origin name is not accepted
|
# Origin name is not accepted
|
||||||
not lvcreate -s $vg/lv1 -L4M -V2G --name $vg/lv4
|
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
|
# Test --poolmetadatasize range
|
||||||
# allocating large devices for testing
|
# allocating large devices for testing
|
||||||
aux teardown_devs
|
aux teardown_devs
|
||||||
aux prepare_pvs 10 16500
|
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
|
lvcreate -L4M --chunksize 128 --poolmetadatasize 0 -T $vg/pool1 2>out
|
||||||
grep "WARNING: Minimum" out
|
grep "WARNING: Minimum" out
|
||||||
|
@ -694,8 +694,9 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
|||||||
* Check selected options are compatible and determine segtype
|
* Check selected options are compatible and determine segtype
|
||||||
*/
|
*/
|
||||||
// FIXME -m0 implies *striped*
|
// FIXME -m0 implies *striped*
|
||||||
if (arg_count(cmd, thin_ARG) && arg_count(cmd,mirrors_ARG)) {
|
if ((arg_count(cmd, thin_ARG) || arg_count(cmd, thinpool_ARG)) &&
|
||||||
log_error("--thin and --mirrors are incompatible.");
|
arg_count(cmd,mirrors_ARG)) {
|
||||||
|
log_error("--thin,--thinpool and --mirrors are incompatible.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user