2017-07-02 22:38:32 +03:00
#!/usr/bin/env bash
2010-11-25 20:15:46 +03: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 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2010-11-25 20:15:46 +03:00
2018-05-24 17:49:48 +03:00
2016-02-23 01:13:42 +03:00
2014-06-06 19:40:04 +04:00
. lib/inittest
2010-11-25 20:15:46 +03:00
aux prepare_vg 4
2011-01-11 20:05:08 +03:00
2013-08-08 00:48:31 +04:00
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
2012-03-16 17:00:05 +04:00
not lvconvert -m 2 --mirrorlog core $vg /mirror " $dev3 " 2>& 1 | tee errs
2010-11-25 20:15:46 +03:00
grep "two steps" errs
2011-01-11 20:05:08 +03:00
2012-03-16 17:00:05 +04:00
lvconvert -m 2 $vg /mirror " $dev3 "
2010-11-25 20:15:46 +03:00
lvconvert --mirrorlog core $vg /mirror
2012-03-16 17:00:05 +04:00
not lvconvert -m 1 --mirrorlog disk $vg /mirror " $dev3 " 2>& 1 | tee errs
2010-11-25 20:15:46 +03:00
grep "two steps" errs
2011-01-11 20:05:08 +03:00
2016-12-11 12:18:44 +03:00
if test ! -e LOCAL_CLVMD ; then
2013-06-15 13:21:03 +04:00
# FIXME mirrored unsupported in cluster
2012-03-16 17:00:05 +04:00
not lvconvert -m 1 --mirrorlog mirrored $vg /mirror " $dev3 " " $dev4 " 2>& 1 | tee errs
2011-01-11 20:05:08 +03:00
grep "two steps" errs
2016-12-11 12:18:44 +03:00
fi
2014-02-27 02:25:30 +04:00
vgremove -ff $vg