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

tests: remove vgconvert usage

This commit is contained in:
David Teigland 2018-06-13 14:16:28 -05:00
parent d067263f51
commit a163d5341a
2 changed files with 0 additions and 57 deletions

View File

@ -46,41 +46,3 @@ for mdacp in 1 0; do
vgremove -f $vg vgremove -f $vg
done done
not grep "Cached VG .* incorrect PV list" out0 not grep "Cached VG .* incorrect PV list" out0
# begin M1 metadata tests
if test -n "$LVM_TEST_LVM1" ; then
pvcreate -M1 "$dev1" "$dev2" "$dev3"
pv3_uuid=$(get pv_field "$dev3" pv_uuid)
vgcreate $SHARED -M1 $vg "$dev1" "$dev2" "$dev3"
pvchange --uuid "$dev1"
# verify pe_start of all M1 PVs
pv_align="128.00k"
check pv_field "$dev1" pe_start $pv_align
check pv_field "$dev2" pe_start $pv_align
check pv_field "$dev3" pe_start $pv_align
pvs --units k -o name,pe_start,vg_mda_size,vg_name "${DEVICES[@]}"
# upgrade from v1 to v2 metadata
vgconvert -M2 $vg
# verify pe_start of all M2 PVs
check pv_field "$dev1" pe_start $pv_align
check pv_field "$dev2" pe_start $pv_align
check pv_field "$dev3" pe_start $pv_align
pvs --units k -o name,pe_start,vg_mda_size,vg_name "${DEVICES[@]}"
# create backup and then restore $dev3
vgcfgbackup -f "$TESTDIR/bak-%s" "$vg"
pvcreate -ff -y --restorefile "$TESTDIR/bak-$vg" --uuid "$pv3_uuid" "$dev3"
vgcfgrestore -f "$TESTDIR/bak-$vg" "$vg"
# verify pe_start of $dev3
check pv_field "$dev3" pe_start $pv_align
fi
# end M1 metadata tests

View File

@ -143,25 +143,6 @@ pvcreate --metadatasize 128k --metadatacopies 2 --dataalignmentoffset 7s "$dev1"
check pv_field "$dev1" pv_mda_count 2 check pv_field "$dev1" pv_mda_count 2
# FIXME: compare start of 2nd mda with and without --dataalignmentoffset # FIXME: compare start of 2nd mda with and without --dataalignmentoffset
#COMM 'pv with LVM1 compatible data alignment can be convereted'
#compatible == LVM1_PE_ALIGN == 64k
if test -n "$LVM_TEST_LVM1" ; then
pvcreate --dataalignment 256k "$dev1"
vgcreate $SHARED -s 1m $vg "$dev1"
vgconvert -M1 $vg
vgconvert -M2 $vg
check pv_field "$dev1" pe_start 256.00k
vgremove $vg
fi
#COMM 'pv with LVM1 incompatible data alignment cannot be convereted'
if test -n "$LVM_TEST_LVM1" ; then
pvcreate --dataalignment 10k "$dev1"
vgcreate $SHARED -s 1m $vg "$dev1"
not vgconvert -M1 $vg
vgremove $vg
fi
#COMM 'vgcfgrestore allows pe_start=0' #COMM 'vgcfgrestore allows pe_start=0'
#basically it produces nonsense, but it tests vgcfgrestore, #basically it produces nonsense, but it tests vgcfgrestore,
#not that final cfg is usable... #not that final cfg is usable...