1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

tests: update pool uuid handling

Pools now preserve meta LV UUID with swapmetadata operation
to make the usage of lvmlockd easier.

Update test to reflect this change.
This commit is contained in:
Zdenek Kabelac 2023-08-15 23:11:07 +02:00
parent 728617d25d
commit 5a96ca4a7f
2 changed files with 4 additions and 4 deletions

View File

@ -60,14 +60,14 @@ check lv_field $vg/$lv2 cache_settings "random_threshold=56,sequential_threshold
# Check swap of cache pool metadata # Check swap of cache pool metadata
lvconvert --yes --type cache-pool --poolmetadata $lv4 $vg/$lv3 lvconvert --yes --type cache-pool --poolmetadata $lv4 $vg/$lv3
UUID=$(get lv_field $vg/$lv5 uuid) UUID=$(get lv_field $vg/${lv3}_cmeta uuid)
lvconvert --yes --cachepool $vg/$lv3 --poolmetadata $lv5 lvconvert --yes --cachepool $vg/$lv3 --poolmetadata $lv5
check lv_field $vg/${lv3}_cmeta uuid "$UUID" check lv_field $vg/${lv3}_cmeta uuid "$UUID"
# Check swap of cache pool metadata with --swapmetadata # Check swap of cache pool metadata with --swapmetadata
# (should swap back to lv5) # (should swap back to lv5)
lvconvert --yes --swapmetadata $vg/$lv3 --poolmetadata $lv5 lvconvert --yes --swapmetadata $vg/$lv3 --poolmetadata $lv5
check lv_field $vg/$lv5 uuid "$UUID" check lv_field $vg/${lv3}_cmeta uuid "$UUID"
#fail lvconvert --cachepool $vg/$lv1 --poolmetadata $vg/$lv2 #fail lvconvert --cachepool $vg/$lv1 --poolmetadata $vg/$lv2
#lvconvert --yes --type cache-pool --poolmetadata $vg/$lv2 $vg/$lv1 #lvconvert --yes --type cache-pool --poolmetadata $vg/$lv2 $vg/$lv1

View File

@ -82,7 +82,7 @@ lvcreate -L32 -n $lv2 $vg
lvconvert --yes -c 8M --type thin-pool $vg/$lv1 2>&1 | tee err lvconvert --yes -c 8M --type thin-pool $vg/$lv1 2>&1 | tee err
# Check there is a warning for large chunk size and zeroing enabled # Check there is a warning for large chunk size and zeroing enabled
grep "WARNING: Pool zeroing and" err grep "WARNING: Pool zeroing and" err
UUID=$(get lv_field $vg/$lv2 uuid) UUID=$(get lv_field $vg/${lv1}_tmeta uuid)
# Fail is pool is active # Fail is pool is active
# TODO maybe detect inactive pool and deactivate # TODO maybe detect inactive pool and deactivate
fail lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $lv2 fail lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $lv2
@ -92,7 +92,7 @@ check lv_field $vg/${lv1}_tmeta uuid "$UUID"
# and swap again with new command --swapmetadata # and swap again with new command --swapmetadata
lvconvert --yes --swapmetadata $vg/$lv1 --poolmetadata $lv2 lvconvert --yes --swapmetadata $vg/$lv1 --poolmetadata $lv2
check lv_field $vg/$lv2 uuid "$UUID" check lv_field $vg/${lv1}_tmeta uuid "$UUID"
lvremove -f $vg lvremove -f $vg