mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: add check for lvconvert without zeroing
Check lvconvert -Zn does not zero thin-pool metadata. Also check --type zero is usable for thin-pool data.
This commit is contained in:
parent
c06325263f
commit
accf324ccb
@ -77,4 +77,22 @@ dmsetup create "$THIN" --table "0 40960 thin $DM_DEV_DIR/mapper/$POOL 0"
|
||||
|
||||
fsck -n "$DM_DEV_DIR/mapper/$THIN"
|
||||
|
||||
clean_thin_
|
||||
|
||||
lvchange -an $vg
|
||||
|
||||
# Take a copy of metadata
|
||||
lvchange -y -ay $vg/pool_tmeta
|
||||
|
||||
lvcreate -L2 -n $lv1 $vg
|
||||
dd if="$DM_DEV_DIR/$vg/pool_tmeta" of="$DM_DEV_DIR/$vg/$lv1" bs=1M count=1
|
||||
|
||||
# Use zero backend for data device
|
||||
lvcreate --type zero -L2 -n $lv2 $vg
|
||||
|
||||
lvconvert --thinpool $vg/$lv2 --poolmetadata $vg/$lv1 -Zn -y
|
||||
|
||||
# Metadata should NOT be zeroed and device should be available
|
||||
dmsetup create "$THIN" --table "0 40960 thin $DM_DEV_DIR/$vg/$lv2 0"
|
||||
|
||||
# exit calls cleanup_mounted_and_teardown
|
||||
|
Loading…
Reference in New Issue
Block a user