1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: correcting symlink manipulation

Fix symlink and add 'verbose' pvs for a while for checking
scanning correctness.
This commit is contained in:
Zdenek Kabelac 2018-05-24 11:04:38 +02:00
parent 76a45424a7
commit 89f34eaf0c

View File

@ -83,7 +83,7 @@ EOF
if aux kernel_at_least 2 6 33 ; then if aux kernel_at_least 2 6 33 ; then
# in case the system is running without devtmpfs /dev # in case the system is running without devtmpfs /dev
# wait here for created device node on tmpfs # wait here for created device node on tmpfs
test "$DM_DEV_DIR" != "/dev" && cp -LR "${mddev}p1" "$DM_DEV_DIR" test "$DM_DEV_DIR" = "/dev" || cp -LR "${mddev}p1" "${pvdev%/*}"
pvcreate --metadatasize 128k "${pvdev}p1" pvcreate --metadatasize 128k "${pvdev}p1"
@ -100,20 +100,25 @@ EOF
check pv_field "${pvdev}p1" pe_start $pv_align --units b --nosuffix check pv_field "${pvdev}p1" pe_start $pv_align --units b --nosuffix
pvremove "${pvdev}p1" pvremove "${pvdev}p1"
test "$DM_DEV_DIR" != "/dev" && rm -f "$DM_DEV_DIR/${mddev}p1" test "$DM_DEV_DIR" = "/dev" || rm -f "${pvdev}p1"
fi fi
fi fi
# Test newer topology-aware alignment detection w/ --dataalignment override # Test newer topology-aware alignment detection w/ --dataalignment override
if aux kernel_at_least 2 6 33 ; then if aux kernel_at_least 2 6 33 ; then
# make sure we're clean for another test # make sure we're clean for another test
dd if=/dev/zero of="$mddev" bs=512 count=1 dd if=/dev/zero of="$mddev" bs=512 count=4 conv=fdatasync
partprobe -s "$mddev"
aux prepare_md_dev 0 1024 2 "$dev1" "$dev2" aux prepare_md_dev 0 1024 2 "$dev1" "$dev2"
pvdev=$(< MD_DEV_PV) pvdev=$(< MD_DEV_PV)
# optimal_io_size=2097152, minimum_io_size=1048576 # optimal_io_size=2097152, minimum_io_size=1048576
pvcreate --metadatasize 128k \ pvcreate --metadatasize 128k \
--config 'devices { md_chunk_alignment=0 }' "$pvdev" --config 'devices { md_chunk_alignment=0 }' "$pvdev"
# to see the processing of scanning
pvs -vvvv
check pv_field "$pvdev" pe_start "2.00m" check pv_field "$pvdev" pe_start "2.00m"
# now verify pe_start alignment override using --dataalignment # now verify pe_start alignment override using --dataalignment