2
# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
4
# This copyrighted material is made available to anyone wishing to use,
5
# modify, copy, or redistribute it subject to the terms and conditions
6
# of the GNU General Public License v.2.
8
# You should have received a copy of the GNU General Public License
9
# along with this program; if not, write to the Free Software Foundation,
10
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14
aux lvmconf 'allocation/maximise_cling = 0'
15
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
17
# 2-way mirror with corelog, 2 PVs
18
lvcreate -l2 -m1 --mirrorlog core -n $lv1 $vg $dev1 $dev2
19
check mirror_images_redundant $vg $lv1
22
# 2-way mirror with disklog, 3 PVs
23
lvcreate -l2 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0-1
24
check mirror_images_redundant $vg $lv1
25
check mirror_log_on $vg $lv1 $dev3
28
# 3-way mirror with disklog, 4 PVs
29
lvcreate -l2 -m2 --mirrorlog disk -n $lv1 $vg $dev1 $dev2 $dev4 $dev3:0-1
30
check mirror_images_redundant $vg $lv1
31
check mirror_log_on $vg $lv1 $dev3
34
# lvcreate --nosync is in 100% sync after creation (bz429342)
35
lvcreate -l2 -m1 --nosync -n $lv1 $vg $dev1 $dev2 $dev3:0-1 2>out
36
grep "New mirror won't be synchronised." out
37
lvs -o copy_percent --noheadings $vg/$lv1 | grep 100.00
40
# creating 2-way mirror with disklog from 2 PVs fails
41
not lvcreate -l2 -m1 -n $lv1 $vg $dev1 $dev2