]> sourceware.org Git - lvm2.git/commitdiff
tests: pvscan-autoactivate test unmatching dev and PV size
authorDavid Teigland <teigland@redhat.com>
Thu, 11 Jul 2019 16:38:12 +0000 (11:38 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 11 Jul 2019 16:38:12 +0000 (11:38 -0500)
test/shell/pvscan-autoactivate.sh

index d674dc52278035103139ecf2cc3adc2c41c8e94a..d79a7e3b909997dc9d9a730a63842f6da3985fb1 100644 (file)
@@ -27,7 +27,7 @@ _clear_online_files() {
 
 . lib/inittest
 
-aux prepare_pvs 8
+aux prepare_devs 8 16
 
 vgcreate $vg1 "$dev1" "$dev2"
 lvcreate -n $lv1 -l 4 -a n $vg1
@@ -209,3 +209,29 @@ pvscan --cache -aay
 check lv_field $vg3/$lv1 lv_active "active"
 lvchange -an $vg3
 
+# Test event activation when PV and dev size don't match
+
+vgremove -ff $vg3
+
+pvremove "$dev8"
+pvcreate -y --setphysicalvolumesize 8M "$dev8"
+
+PVID8=`pvs $dev8 --noheading -o uuid | tr -d - | awk '{print $1}'`
+echo $PVID8
+
+vgcreate $vg3 "$dev8"
+lvcreate -l1 -n $lv1 $vg3
+check lv_field $vg3/$lv1 lv_active "active"
+vgchange -an $vg3
+check lv_field $vg3/$lv1 lv_active ""
+
+_clear_online_files
+
+pvscan --cache -aay "$dev8"
+check lv_field $vg3/$lv1 lv_active "active"
+ls "$RUNDIR/lvm/pvs_online/$PVID8"
+ls "$RUNDIR/lvm/vgs_online/$vg3"
+vgchange -an $vg3
+
+vgremove -ff $vg3
+
This page took 0.041164 seconds and 5 git commands to generate.