Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / lvm2 / dist / test / t-lvconvert-repair.sh
bloba40cd276774b4a432f380e610fda86fa94359ca4
1 #!/bin/bash
2 # Copyright (C) 2008 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
12 . ./test-utils.sh
14 prepare_vg 4
16 vgreduce $vg $dev4
17 lvcreate -m 1 -L 1 -n mirror $vg
19 lvchange -a n $vg/mirror
20 vgextend $vg $dev4
21 disable_dev $dev1
22 lvchange --partial -a y $vg/mirror
24 not vgreduce -v --removemissing $vg
25 lvconvert -y -i 1 --repair $vg/mirror
26 vgreduce --removemissing $vg
28 enable_dev $dev1
29 vgextend $vg $dev1
30 disable_dev $dev2
31 lvconvert -y -i 1 --repair $vg/mirror
32 vgreduce --removemissing $vg
34 enable_dev $dev2
35 vgextend $vg $dev2
36 disable_dev $dev3
37 lvconvert -y -i 1 --repair $vg/mirror
38 vgreduce --removemissing $vg
40 enable_dev $dev3
41 vgextend $vg $dev3
42 lvcreate -m 2 -l 1 -n mirror2 $vg $dev1 $dev2 $dev3 $dev4
43 vgchange -a n $vg
44 pvremove -ff -y $dev4
45 echo 'y' | not lvconvert -y -i 1 --repair $vg/mirror2
46 vgs