2014-10-07 04:08:03 +04:00
#!/bin/sh
# Copyright (C) 2008-2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
test_description = 'Test process_each_pv with zero mda'
2015-10-27 17:10:06 +03:00
SKIP_WITH_LVMPOLLD = 1
2014-10-07 04:08:03 +04:00
. lib/inittest
aux prepare_devs 14
# for vg1
2014-10-07 11:54:47 +04:00
pvcreate " $dev10 "
2014-10-07 04:08:03 +04:00
# for vg2
2014-10-07 11:54:47 +04:00
pvcreate " $dev2 " --metadatacopies 0
pvcreate " $dev3 "
pvcreate " $dev4 "
pvcreate " $dev5 "
2014-10-07 04:08:03 +04:00
# for vg3
2014-10-07 11:54:47 +04:00
pvcreate " $dev6 " --metadatacopies 0
pvcreate " $dev7 " --metadatacopies 0
pvcreate " $dev8 " --metadatacopies 0
pvcreate " $dev9 "
2014-10-07 04:08:03 +04:00
# orphan with mda
pvcreate " $dev11 "
# orphan without mda
pvcreate " $dev14 " --metadatacopies 0
# non-pv devs
# dev12
# dev13
2015-08-21 00:09:29 +03:00
vgcreate $SHARED $vg1 " $dev10 "
vgcreate $SHARED $vg2 " $dev2 " " $dev3 " " $dev4 " " $dev5 "
vgcreate $SHARED $vg3 " $dev6 " " $dev7 " " $dev8 " " $dev9 "
2014-10-07 04:08:03 +04:00
2014-10-07 11:54:47 +04:00
pvs -a | tee err
grep " $dev10 " err
grep " $dev2 " err
grep " $dev3 " err
grep " $dev4 " err
grep " $dev5 " err
grep " $dev6 " err
grep " $dev7 " err
grep " $dev8 " err
grep " $dev9 " err
grep " $dev11 " err
grep " $dev12 " err
grep " $dev13 " err
grep " $dev14 " err
2015-08-21 00:09:29 +03:00
vgremove $vg1 $vg2 $vg3