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

tests: validate acceptable external origin size

This commit is contained in:
Zdenek Kabelac 2014-01-29 14:23:50 +01:00
parent 155405b0e1
commit 42fa0e6dd1
2 changed files with 16 additions and 2 deletions

View File

@ -49,9 +49,13 @@ fi
lvcreate -l10 -T $vg/pool
# Can't convert pool to external origin
lvcreate -l10 -T $vg/pool1
lvcreate -l10 -T $vg/pool1 -c 192k
not lvconvert -T --thinpool $vg/pool1 $vg/pool --originname origin
lvremove -f $vg/pool1
# Create pool1 chunk_size unaligned LV and check failing conversion
lvcreate -l2 -n $lv1 $vg
not lvconvert -T --thinpool $vg/pool1 $vg/$lv1
lvremove -f $vg/pool1 $vg/$lv1
# create plain LV (will be used for external origin)
lvcreate -L8M -n $lv1 $vg

View File

@ -26,6 +26,16 @@ aux prepare_pvs 2 64
vgcreate $vg -s 64K $(cat DEVICES)
# Test validation for external origin being multiple of thin pool chunk size
lvcreate -L10M -T $vg/pool192 -c 192k
lvcreate -an -pr -Zn -l1 -n $lv1 $vg
not lvcreate -s $vg/$lv1 --thinpool $vg/pool192
lvcreate -an -pr -Zn -l5 -n $lv2 $vg
not lvcreate -s $vg/$lv2 --thinpool $vg/pool192
lvremove -f $vg
# Prepare pool and external origin with filesystem
lvcreate -L10M -V10M -T $vg/pool --name $lv1
mkfs.ext2 $DM_DEV_DIR/$vg/$lv1