mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: updates
Move thin test out of listing.
This commit is contained in:
parent
6f057e3c66
commit
7b766b0648
@ -65,10 +65,10 @@ lvcreate -aey -l2 --type mirror -m2 -n $lv3 $vg
|
||||
test $(lvs --noheadings $vg | wc -l) -eq 2
|
||||
test $(lvs -a --noheadings $vg | wc -l) -eq 6
|
||||
dmsetup ls|grep "$PREFIX"|grep -v "LVMTEST.*pv."
|
||||
|
||||
lvcreate -l2 -s $vg/$lv3
|
||||
lvcreate -l1 -s -n inval $vg/$lv3
|
||||
lvcreate -l4 -I4 -i2 -n stripe $vg
|
||||
lvcreate -T $vg/pool -I4 -i2 -l5 -V1P -n thin
|
||||
# Invalidate snapshot
|
||||
not dd if=/dev/zero of="$DM_DEV_DIR/$vg/inval" bs=4K
|
||||
invalid lvscan "$dev1"
|
||||
|
@ -135,7 +135,7 @@ lvremove -ff $vg
|
||||
check vg_field $vg lv_count 0
|
||||
|
||||
# Create thin snapshot of thinLV
|
||||
lvcreate -L10M -V10M -T $vg/pool --name lv1
|
||||
lvcreate -L10M -I4 -i2 -V10M -T $vg/pool --name lv1
|
||||
mkfs.ext4 "$DM_DEV_DIR/$vg/lv1"
|
||||
lvcreate -K -s $vg/lv1 --name snap_lv1
|
||||
fsck -n "$DM_DEV_DIR/$vg/snap_lv1"
|
||||
@ -145,8 +145,10 @@ lvcreate --type snapshot $vg/lv1 --name lv6
|
||||
lvcreate --type snapshot $vg/lv1 --name lv4
|
||||
lvcreate --type snapshot $vg/lv1 --name $vg/lv5
|
||||
|
||||
lvdisplay --maps $vg
|
||||
check_lv_field_modules_ thin-pool,thin lv1 snap_lv1 lv2 lv3 lv4 lv5 lv6
|
||||
check vg_field $vg lv_count 8
|
||||
|
||||
lvremove -ff $vg
|
||||
|
||||
|
||||
@ -163,8 +165,6 @@ check vg_field $vg lv_count 6
|
||||
lvremove -ff $vg
|
||||
check vg_field $vg lv_count 0
|
||||
|
||||
lvdisplay $vg
|
||||
|
||||
# Fail cases
|
||||
# Too small pool size (1 extent 64KB) for given chunk size
|
||||
not lvcreate --chunksize 256 -l1 -T $vg/pool1
|
||||
|
@ -24,8 +24,7 @@ lvcreate -L2 -s $vg/$lv1 -n $lv2
|
||||
|
||||
dd if=/dev/zero of="$DM_DEV_DIR/$vg/$lv2" bs=1M count=1
|
||||
|
||||
get lv_field $vg/$lv2 lv_attr | tee attrs
|
||||
# Snapshot must not be invalid here
|
||||
grep -v "....I" attrs
|
||||
# Snapshot must not be 'I'nvalid here
|
||||
check lv_attr_bit state $vg/$lv2 "a"
|
||||
|
||||
vgremove -f $vg
|
||||
|
@ -145,6 +145,7 @@ lvextend -l+33 $vg1/lvol1
|
||||
check lv_field $vg1/lvol1 size "$EXPECT3"
|
||||
|
||||
fill 20K
|
||||
|
||||
lvremove -f $vg1
|
||||
|
||||
# Check snapshot really deletes COW header for read-only snapshot
|
||||
@ -172,11 +173,12 @@ fsck -n "$DM_DEV_DIR/$vg1/snap"
|
||||
# we have 2 valid results (unsure about correct version number)
|
||||
check lv_field $vg1/snap data_percent "$EXPECT4"
|
||||
|
||||
# Can't test >= 16T devices on 32bit
|
||||
if test "$TSIZE" = 15P ; then
|
||||
|
||||
vgremove -ff $vg1
|
||||
|
||||
|
||||
# Can't test >= 16T devices on 32bit
|
||||
test "$TSIZE" = 15P || exit 0
|
||||
|
||||
# Check usability with largest extent size
|
||||
pvcreate "$DM_DEV_DIR/$vg/$lv"
|
||||
vgcreate -s 4G $vg1 "$DM_DEV_DIR/$vg/$lv"
|
||||
@ -189,4 +191,4 @@ lvremove -ff $vg1
|
||||
lvcreate -V15E -l1 -n $lv1 -s $vg1
|
||||
check lv_field $vg1/$lv1 origin_size "15.00e"
|
||||
|
||||
fi
|
||||
vgremove -ff $vg1
|
||||
|
Loading…
Reference in New Issue
Block a user