2017-07-02 22:38:32 +03:00
#!/usr/bin/env bash
2011-05-07 19:52:16 +04: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,
2016-01-21 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2011-05-07 19:52:16 +04:00
2016-02-23 01:13:42 +03:00
SKIP_WITH_LVMLOCKD = 1
2015-10-27 17:10:06 +03:00
SKIP_WITH_CLVMD = 1
SKIP_WITH_LVMPOLLD = 1
2011-05-07 19:52:16 +04:00
2015-10-27 17:10:06 +03:00
. lib/inittest
2012-05-01 23:21:24 +04:00
#
# Snapshots of 'mirrors' are not supported. They can no longer be created.
# This file could be used to test some aspect of vgreduce, snapshot, and
# RAID at some point though...
#
2011-05-07 19:52:16 +04:00
aux prepare_vg 5
2012-03-16 17:00:05 +04:00
2015-10-27 17:10:06 +03:00
lvcreate --type mirror -m 3 -L 2M -n 4way $vg " $dev1 " " $dev2 " " $dev3 " " $dev4 " " $dev5 " :0
2011-05-07 19:52:16 +04:00
lvcreate -s $vg /4way -L 2M -n snap
2012-03-16 17:00:05 +04:00
lvcreate -i 2 -L 2M $vg " $dev1 " " $dev2 " -n stripe
2011-05-07 19:52:16 +04:00
2012-03-16 17:00:05 +04:00
aux disable_dev " $dev2 " " $dev4 "
2011-05-07 19:52:16 +04:00
echo n | lvconvert --repair $vg /4way
2012-03-16 17:00:05 +04:00
aux enable_dev " $dev2 " " $dev4 "
2011-05-07 19:52:16 +04:00
#not vgreduce --removemissing $vg
2012-03-16 17:00:05 +04:00
vgreduce -v --removemissing --force $vg # "$dev2" "$dev4"
lvs -a -o +devices $vg | not grep unknown
lvs -a -o +devices $vg
check mirror $vg 4way " $dev5 "
2014-02-27 02:25:30 +04:00
vgremove -ff $vg