Tizen 2.1 base
[external/device-mapper.git] / test / t-lvchange-mirror.sh
1 #!/bin/sh
2 # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
3 #
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.
7 #
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
11
12 . ./test-utils.sh
13 aux prepare_vg 3
14
15 # force resync 2-way active mirror
16 lvcreate -l2 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0-1
17 check mirror $vg $lv1 $dev3
18 echo y | lvchange --resync $vg/$lv1
19 check mirror $vg $lv1 $dev3
20 lvremove -ff $vg
21
22 # force resync 2-way inactive mirror
23 lvcreate -l2 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0-1
24 lvchange -an $vg/$lv1
25 check mirror $vg $lv1 $dev3
26 lvchange --resync $vg/$lv1
27 check mirror $vg $lv1 $dev3
28 lvremove -ff $vg