2012-03-16 17:00:05 +04:00
#!/bin/sh
2011-01-07 17:56:52 +03:00
# Copyright (C) 2011 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
2015-10-27 17:10:06 +03:00
SKIP_WITH_LVMPOLLD = 1
2011-01-07 17:56:52 +03:00
2015-10-27 17:10:06 +03:00
. lib/inittest
2015-05-09 02:59:18 +03:00
2011-01-07 17:56:52 +03:00
aux prepare_vg 5
2015-04-08 23:44:16 +03:00
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
2011-02-28 22:44:21 +03:00
2013-08-08 00:48:31 +04:00
lvcreate -aey --type mirror -m 3 --ignoremonitoring -L 2M -n 4way $vg " $dev1 " " $dev2 " " $dev3 " " $dev4 " " $dev5 " :0
2011-01-07 17:56:52 +03:00
lvcreate -s $vg /4way -L 2M -n snap
2012-03-16 17:00:05 +04:00
aux disable_dev " $dev2 " " $dev4 "
2011-01-07 17:56:52 +03:00
echo n | lvconvert --repair $vg /4way 2>& 1 | tee 4way.out
2012-03-16 17:00:05 +04:00
lvs -a -o +devices $vg | not grep unknown
2011-01-07 17:56:52 +03:00
vgreduce --removemissing $vg
2012-03-16 17:00:05 +04:00
aux enable_dev " $dev2 " " $dev4 "
lvs -a -o +devices $vg
check mirror $vg 4way " $dev5 "
2014-02-27 02:25:30 +04:00
2015-06-26 23:00:40 +03:00
vgchange -an $vg
2014-02-27 02:25:30 +04:00
vgremove -ff $vg