summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-11-22 18:15:52 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2014-11-22 18:51:02 +0100
commit078230971358c38b124fabb59b0dd3d92521b6f6 (patch)
treea1842a07af0b67bc506e4ad9afa72208cdbe194a
parent4607cbcb0d785a8b112c32ee2487c5f9ee59cdc4 (diff)
downloadlvm2-078230971358c38b124fabb59b0dd3d92521b6f6.tar.gz
tests: reduce thin test
-rw-r--r--test/shell/lvconvert-repair-thin.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/shell/lvconvert-repair-thin.sh b/test/shell/lvconvert-repair-thin.sh
index 8e35ad1c7..0e9534b1b 100644
--- a/test/shell/lvconvert-repair-thin.sh
+++ b/test/shell/lvconvert-repair-thin.sh
@@ -36,16 +36,14 @@ lvcreate -L2 -n fixed $vg
lvs -a -o+seg_pe_ranges $vg
#aux error_dev "$dev2" 2050:1
-vgchange -an $vg
-
-lvconvert --repair $vg/pool
-
-lvs -a $vg
+lvchange -an $vg/$lv2 $vg/$lv1 $vg/pool $vg/repair
# Manual repair steps:
# Test swapping - swap out thin-pool's metadata with our repair volume
lvconvert -y -f --poolmetadata $vg/repair --thinpool $vg/pool
+lvchange -ay $vg/repair
+
#
# To continue this test - we need real tools available
# When they are not present mark test as skipped, but still
@@ -55,8 +53,6 @@ aux have_tool_at_least "$LVM_TEST_THIN_CHECK_CMD" 0 3 1 || skip
aux have_tool_at_least "$LVM_TEST_THIN_DUMP_CMD" 0 3 1 || skip
aux have_tool_at_least "$LVM_TEST_THIN_REPAIR_CMD" 0 3 1 || skip
-lvchange -aey $vg/repair $vg/fixed
-
# Make some 'repairable' damage??
dd if=/dev/zero of="$DM_DEV_DIR/$vg/repair" bs=1 seek=40960 count=1
@@ -89,10 +85,10 @@ lvconvert -v --repair $vg/pool
# Check repaired pool could be activated
lvchange -ay $vg/pool
-lvchange -an $vg
+vgchange -an $vg
# Restore damaged metadata
-lvconvert -y -f --poolmetadata $vg/pool_meta1 --thinpool $vg/pool
+lvconvert -y -f --poolmetadata $vg/pool_meta0 --thinpool $vg/pool
# Check lvremove -ff works even with damaged pool
lvremove -ff $vg