2017-07-02 21:38:32 +02:00
#!/usr/bin/env bash
2018-12-17 19:24:37 +01:00
# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
2010-11-25 17:15:46 +00:00
#
# 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
2023-07-14 11:18:58 +02:00
SKIP_WITH_LVMPOLLD = 1
2016-02-22 16:13:42 -06:00
2014-06-06 17:40:04 +02:00
. lib/inittest
2010-11-25 17:15:46 +00:00
2018-12-17 19:24:37 +01:00
aux lvmconf "global/support_mirrored_mirror_log=1"
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
2018-12-18 10:55:35 +01:00
if test ! -e LOCAL_CLVMD ; then
# FIXME mirrored unsupported in cluster
not lvconvert -m 1 --mirrorlog mirrored $vg /mirror " $dev3 " " $dev4 " 2>& 1 | tee errs
grep "two steps" errs
fi
2014-02-26 23:25:30 +01:00
vgremove -ff $vg