1# Copyright (C) 2008 Red Hat, Inc. All rights reserved. 2# 3# This copyrighted material is made available to anyone wishing to use, 4# modify, copy, or redistribute it subject to the terms and conditions 5# of the GNU General Public License v.2. 6# 7# You should have received a copy of the GNU General Public License 8# along with this program; if not, write to the Free Software Foundation, 9# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 10 11. ./test-utils.sh 12 13aux prepare_devs 5 14 15pvcreate $dev1 16pvcreate --metadatacopies 0 $dev2 17pvcreate --metadatacopies 0 $dev3 18pvcreate $dev4 19pvcreate --metadatacopies 0 $dev5 20 21vgcreate -c n "$vg" $devs 22lvcreate -n $lv -l 1 -i5 -I256 $vg 23 24pvchange -x n $dev1 25pvchange -x y $dev1 26vgchange -a n $vg 27pvchange --uuid $dev1 28pvchange --uuid $dev2 29vgremove -f $vg 30 31# check that PVs without metadata don't cause too many full device rescans (bz452606) 32for mdacp in 1 0; do 33 pvcreate --metadatacopies $mdacp $devs 34 pvcreate $dev1 35 vgcreate $vg $devs 36 lvcreate -n $lv1 -l 2 -i5 -I256 $vg 37 lvcreate -n $lv2 -m2 -l 2 $vg 38 #lvchange -an $vg 39 lvchange -an $vg/$lv1 >out$mdacp 2>&1 40 lvchange -an $vg/$lv2 >>out$mdacp 2>&1 41 test ! -s out$mdacp 42 vgchange -ay $vg 43 lvchange -vvvv -an $vg/$lv1 >out$mdacp 2>&1 44 lvchange -vvvv -an $vg/$lv2 >>out$mdacp 2>&1 45 eval run$mdacp=$(wc -l <out$mdacp) 46 vgremove -f $vg 47done 48not grep "Cached VG .* incorrect PV list" out0 49 50# some M1 metadata tests 51pvcreate -M1 $dev1 52pvcreate -M1 $dev2 53pvcreate -M1 $dev3 54vgcreate -M1 $vg $dev1 $dev2 $dev3 55pvchange --uuid $dev1 56