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_description
='Exercise some vgchange diagnostics'
17 pvcreate
--metadatacopies 0 $dev1
24 vgs
--noheading -o $field $vg |
sed 's/^ *//'
29 # vgchange -p MaxPhysicalVolumes (bz202232)
30 aux check_vg_field_
$vg max_pv
0
32 aux check_vg_field_
$vg max_pv
128
34 pv_count
=$
(get_vg_field
$vg pv_count
)
35 not vgchange
-p 2 $vg 2>err
36 grep "MaxPhysicalVolumes is less than the current number $pv_count of PVs for" err
37 aux check_vg_field_
$vg max_pv
128
39 # vgchange -l MaxLogicalVolumes
40 aux check_vg_field_
$vg max_lv
0
42 aux check_vg_field_
$vg max_lv
128
44 lvcreate
-l4 -n$lv1 $vg
45 lvcreate
-l4 -n$lv2 $vg
47 lv_count
=$
(get_vg_field
$vg lv_count
)
48 not vgchange
-l 1 $vg 2>err
49 grep "MaxLogicalVolume is less than the current number $lv_count of LVs for" err
50 aux check_vg_field_
$vg max_lv
128