From f84a7266bc991d22572381671ced88e93dcb0a68 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 11 Sep 2020 14:44:05 +0200 Subject: [PATCH] tests: reduce disk space usage by pvck-dump Lower disk usage for 'dd'. --- test/shell/pvck-dump.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/test/shell/pvck-dump.sh b/test/shell/pvck-dump.sh index 8892152b2..3b6344d93 100644 --- a/test/shell/pvck-dump.sh +++ b/test/shell/pvck-dump.sh @@ -12,16 +12,16 @@ . lib/inittest -# 4 devs each 128MB -aux prepare_devs 4 128 +SIZE_MB=80 +# 4 devs each $SIZE_MB +aux prepare_devs 4 $SIZE_MB get_devs -dd if=/dev/zero of="$dev1" bs=1M count=2 || true -dd if=/dev/zero of="$dev2" bs=1M count=2 || true -dd if=/dev/zero of="$dev3" bs=1M count=2 || true -dd if=/dev/zero of="$dev4" bs=1M count=2 || true +dd if=/dev/zero of="$dev1" bs=1M count=2 conv=fdatasync +dd if=/dev/zero of="$dev2" bs=1M count=2 conv=fdatasync # clear entire dev to cover mda2 -dd if=/dev/zero of="$dev3" || true +dd if=/dev/zero of="$dev3" bs=1M count=$SIZE_MB conv=fdatasync +dd if=/dev/zero of="$dev4" bs=1M count=2 conv=fdatasync pvcreate "$dev1" pvcreate "$dev2" @@ -135,16 +135,15 @@ diff area1 area3b vgremove -ff $vg -dd if=/dev/zero of="$dev1" bs=1M count=32 || true -dd if=/dev/zero of="$dev2" bs=1M count=32 || true -dd if=/dev/zero of="$dev3" bs=1M count=32 || true -dd if=/dev/zero of="$dev4" bs=1M count=32 || true # clear entire dev to cover mda2 -dd if=/dev/zero of="$dev1" || true +dd if=/dev/zero of="$dev1" bs=1M count=$SIZE_MB conv=fdatasync +dd if=/dev/zero of="$dev2" bs=1M count=32 conv=fdatasync +dd if=/dev/zero of="$dev3" bs=1M count=32 conv=fdatasync +dd if=/dev/zero of="$dev4" bs=1M count=32 conv=fdatasync pvcreate --pvmetadatacopies 2 --metadatasize 32M "$dev1" -vgcreate $SHARED -s 512K --metadatasize 32M $vg "$dev1" "$dev2" "$dev3" "$dev4" +vgcreate $SHARED -s 64K --metadatasize 32M $vg "$dev1" "$dev2" "$dev3" "$dev4" for i in $(seq 1 500); do echo "lvcreate -an -n lv$i -l1 $vg"; done | lvm -- 2.43.5