2012-03-16 13:00:05 +00:00
#!/bin/sh
2010-11-25 17:15:46 +00:00
# Copyright (C) 2010 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 11:49:46 +01:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2010-11-25 17:15:46 +00:00
2016-02-22 16:13:42 -06:00
SKIP_WITH_LVMLOCKD = 1
2014-06-06 17:40:04 +02:00
. lib/inittest
2010-11-25 17:15:46 +00:00
aux prepare_vg 4
2011-01-11 17:05:08 +00:00
2013-08-07 15:48:31 -05:00
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
2012-03-16 13:00:05 +00:00
not lvconvert -m 2 --mirrorlog core $vg /mirror " $dev3 " 2>& 1 | tee errs
2010-11-25 17:15:46 +00:00
grep "two steps" errs
2011-01-11 17:05:08 +00:00
2012-03-16 13:00:05 +00:00
lvconvert -m 2 $vg /mirror " $dev3 "
2010-11-25 17:15:46 +00:00
lvconvert --mirrorlog core $vg /mirror
2012-03-16 13:00:05 +00:00
not lvconvert -m 1 --mirrorlog disk $vg /mirror " $dev3 " 2>& 1 | tee errs
2010-11-25 17:15:46 +00:00
grep "two steps" errs
2011-01-11 17:05:08 +00:00
2013-06-15 11:21:03 +02:00
test -e LOCAL_CLVMD && exit 0
# FIXME mirrored unsupported in cluster
2012-03-16 13:00:05 +00:00
not lvconvert -m 1 --mirrorlog mirrored $vg /mirror " $dev3 " " $dev4 " 2>& 1 | tee errs
2011-01-11 17:05:08 +00:00
grep "two steps" errs
2014-02-26 23:25:30 +01:00
vgremove -ff $vg