mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
tests: tune usage of smaller metadata
While the previous commit c9b40083fc34b5e2a1bfc7b251b38c0b8737483f decresed version to 1.19 for using bigger datasets, it's not been quite right - so from our bb machine it looks like bigger metadata consumption started with 1.19 and kernel 4.18 (fc27)
This commit is contained in:
parent
1005fd7b06
commit
9c0d11ecc9
@ -19,6 +19,13 @@ export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
|
||||||
|
# With thin-pool version >= 1.19 and kernel >= 4.18
|
||||||
|
# slightly less metadata can fit.
|
||||||
|
BIG_DATA="generate_more_metadata"
|
||||||
|
aux target_at_least dm-thin-pool 1 19 0 && \
|
||||||
|
aux kernel_at_least 4 18 0 && BIG_DATA=""
|
||||||
|
|
||||||
meta_percent_() {
|
meta_percent_() {
|
||||||
get lv_field $vg/pool metadata_percent | cut -d. -f1
|
get lv_field $vg/pool metadata_percent | cut -d. -f1
|
||||||
}
|
}
|
||||||
@ -91,7 +98,7 @@ lvchange -an $vg/pool
|
|||||||
# Consume more then (100% - 4MiB) out of 32MiB metadata volume (>87.5%)
|
# Consume more then (100% - 4MiB) out of 32MiB metadata volume (>87.5%)
|
||||||
# (Test for less than 4MiB free space in metadata, which is less than 25%)
|
# (Test for less than 4MiB free space in metadata, which is less than 25%)
|
||||||
DATA=7200 # Newer version of thin-pool have hidden reserve, so use lower value
|
DATA=7200 # Newer version of thin-pool have hidden reserve, so use lower value
|
||||||
aux target_at_least dm-thin-pool 1 19 0 || DATA=7400
|
test -z "$BIG_DATA" || DATA=7400
|
||||||
fake_metadata_ "$DATA" 2 >data
|
fake_metadata_ "$DATA" 2 >data
|
||||||
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv2"
|
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv2"
|
||||||
# Swap volume with restored fake metadata
|
# Swap volume with restored fake metadata
|
||||||
@ -177,7 +184,7 @@ lvchange -an $vg
|
|||||||
|
|
||||||
#
|
#
|
||||||
DATA=300 # Newer version of thin-pool have hidden reserve, so use lower value
|
DATA=300 # Newer version of thin-pool have hidden reserve, so use lower value
|
||||||
aux target_at_least dm-thin-pool 1 19 0 || DATA=350
|
test -z "$BIG_DATA" || DATA=350
|
||||||
fake_metadata_ $DATA 2 >data
|
fake_metadata_ $DATA 2 >data
|
||||||
lvchange -ay $vg/$lv1
|
lvchange -ay $vg/$lv1
|
||||||
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv1"
|
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user