From 5a96ca4a7fedf873f9b707f35f584d9bde56b357 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 15 Aug 2023 23:11:07 +0200 Subject: [PATCH] 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. --- test/shell/lvconvert-cache.sh | 4 ++-- test/shell/lvconvert-thin.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/shell/lvconvert-cache.sh b/test/shell/lvconvert-cache.sh index cfc8281c9..84a7a522c 100644 --- a/test/shell/lvconvert-cache.sh +++ b/test/shell/lvconvert-cache.sh @@ -60,14 +60,14 @@ check lv_field $vg/$lv2 cache_settings "random_threshold=56,sequential_threshold # Check swap of cache pool metadata 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 check lv_field $vg/${lv3}_cmeta uuid "$UUID" # Check swap of cache pool metadata with --swapmetadata # (should swap back to 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 #lvconvert --yes --type cache-pool --poolmetadata $vg/$lv2 $vg/$lv1 diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh index b1b11abe9..d9724e231 100644 --- a/test/shell/lvconvert-thin.sh +++ b/test/shell/lvconvert-thin.sh @@ -82,7 +82,7 @@ lvcreate -L32 -n $lv2 $vg 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 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 # TODO maybe detect inactive pool and deactivate 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 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