Blame SOURCES/lvm2-2_03_06-tests-pvscan-autoactivate-test-unmatching-dev-and-PV.patch

26e710
 test/shell/pvscan-autoactivate.sh | 28 +++++++++++++++++++++++++++-
26e710
 1 file changed, 27 insertions(+), 1 deletion(-)
26e710
26e710
diff --git a/test/shell/pvscan-autoactivate.sh b/test/shell/pvscan-autoactivate.sh
26e710
index d674dc5..d79a7e3 100644
26e710
--- a/test/shell/pvscan-autoactivate.sh
26e710
+++ b/test/shell/pvscan-autoactivate.sh
26e710
@@ -27,7 +27,7 @@ _clear_online_files() {
26e710
 
26e710
 . lib/inittest
26e710
 
26e710
-aux prepare_pvs 8
26e710
+aux prepare_devs 8 16
26e710
 
26e710
 vgcreate $vg1 "$dev1" "$dev2"
26e710
 lvcreate -n $lv1 -l 4 -a n $vg1
26e710
@@ -209,3 +209,29 @@ pvscan --cache -aay
26e710
 check lv_field $vg3/$lv1 lv_active "active"
26e710
 lvchange -an $vg3
26e710
 
26e710
+# Test event activation when PV and dev size don't match
26e710
+
26e710
+vgremove -ff $vg3
26e710
+
26e710
+pvremove "$dev8"
26e710
+pvcreate -y --setphysicalvolumesize 8M "$dev8"
26e710
+
26e710
+PVID8=`pvs $dev8 --noheading -o uuid | tr -d - | awk '{print $1}'`
26e710
+echo $PVID8
26e710
+
26e710
+vgcreate $vg3 "$dev8"
26e710
+lvcreate -l1 -n $lv1 $vg3
26e710
+check lv_field $vg3/$lv1 lv_active "active"
26e710
+vgchange -an $vg3
26e710
+check lv_field $vg3/$lv1 lv_active ""
26e710
+
26e710
+_clear_online_files
26e710
+
26e710
+pvscan --cache -aay "$dev8"
26e710
+check lv_field $vg3/$lv1 lv_active "active"
26e710
+ls "$RUNDIR/lvm/pvs_online/$PVID8"
26e710
+ls "$RUNDIR/lvm/vgs_online/$vg3"
26e710
+vgchange -an $vg3
26e710
+
26e710
+vgremove -ff $vg3
26e710
+