From 0e2a358da926b75dabd5074fcff589cac0f22821 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 8 Jun 2018 14:28:47 +0200 Subject: [PATCH] tests: check pvresize with metadata size Test new size of a PV can keep also metadata. --- test/shell/pvresize-mdas.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/shell/pvresize-mdas.sh b/test/shell/pvresize-mdas.sh index da4119c9e..240dfb23a 100644 --- a/test/shell/pvresize-mdas.sh +++ b/test/shell/pvresize-mdas.sh @@ -26,3 +26,13 @@ pvresize --setphysicalvolumesize 4m -y "$dev1" check pv_field "$dev1" pv_size 4.00m check pv_field "$dev1" pv_mda_count 2 pvs "$dev1" + +# Check physical size is checked agains metadatasize +pvcreate --metadatasize 2m --metadatacopies 1 -y "$dev1" +not pvresize --setphysicalvolumesize 2m -y "$dev1" |& tee out +grep "Size must exceed physical extent start of 6144 sectors on" out +# 3MiB shall pass with 1M default alignment +pvresize --setphysicalvolumesize 3m -y "$dev1" +check pv_field "$dev1" pv_size 3.00m +check pv_field "$dev1" pv_mda_count 1 +pvs "$dev1" -- 2.43.5