2 # Copyright (C) 2008 Red Hat, Inc. All rights reserved.
4 # This copyrighted material is made available to anyone wishing to use,
5 # modify, copy, or redistribute it subject to the terms and conditions
6 # of the GNU General Public License v.2.
8 # You should have received a copy of the GNU General Public License
9 # along with this program; if not, write to the Free Software Foundation,
10 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12 # 'Test pvchange option values'
20 # "setup pv with metadatacopies = $mda"
22 pvcreate
--metadatacopies $mda $dev1
23 vgcreate
$vg1 $dev1 $dev4
25 # "pvchange adds/dels tag to pvs with metadatacopies = $mda "
26 pvchange
$dev1 --addtag test$mda
27 check_pv_field_
$dev1 pv_tags
test$mda
28 pvchange
$dev1 --deltag test$mda
29 check_pv_field_
$dev1 pv_tags
" "
31 # "vgchange disable/enable allocation for pvs with metadatacopies = $mda (bz452982)"
33 check_pv_field_
$dev1 pv_attr
--
35 check_pv_field_
$dev1 pv_attr a-
43 pvcreate
--metadatacopies 0 $dev1
44 pvcreate
--metadatacopies 2 $dev2
45 vgcreate
$vg1 $dev1 $dev2
48 vg_validate_pvlv_counts_
$vg1 2 0 0
50 # "pvchange rejects uuid change under an active lv"
51 lvcreate
-l 16 -i 2 -n $lv --alloc anywhere
$vg1
52 vg_validate_pvlv_counts_
$vg1 2 1 0
54 lvchange
-an "$vg1"/"$lv"
58 lvremove
-f "$vg1"/"$lv"
61 # "pvchange reject --addtag to lvm1 pv"
63 not pvchange
$dev1 --addtag test