3
# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
5
# This copyrighted material is made available to anyone wishing to use,
6
# modify, copy, or redistribute it subject to the terms and conditions
7
# of the GNU General Public License v.2.
9
# You should have received a copy of the GNU General Public License
10
# along with this program; if not, write to the Free Software Foundation,
11
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
13
# Test activation behaviour with devices missing.
14
# - snapshots and their origins are only activated together; if one fails, both
16
# - partial mirrors are not activated (but maybe they should? maybe we should
17
# instead lvconvert --repair them?)
18
# - linear LVs with bits missing are not activated
24
lvcreate -l1 -n linear1 $vg $dev1
25
lvcreate -l1 -n linear2 $vg $dev2
26
lvcreate -l2 -n linear12 $vg $dev1:4 $dev2:4
28
lvcreate -l1 -n origin1 $vg $dev1
29
lvcreate -s $vg/origin1 -l1 -n s_napshot2 $dev2
31
lvcreate -l1 -m1 -n mirror12 --mirrorlog core $vg $dev1 $dev2
32
lvcreate -l1 -m1 -n mirror123 $vg $dev1 $dev2 $dev3
39
check inactive $vg linear1
40
check active $vg linear2
41
check inactive $vg origin1
42
check inactive $vg s_napshot2
43
check inactive $vg linear12
44
check inactive $vg mirror12
45
check inactive $vg mirror123
53
check active $vg linear1
54
check inactive $vg linear2
55
check inactive $vg linear12
56
check inactive $vg origin1
57
check inactive $vg s_napshot2
58
check inactive $vg mirror12
59
check inactive $vg mirror123
67
check active $vg origin1
68
check active $vg s_napshot2
69
check active $vg linear1
70
check active $vg linear2
71
check active $vg linear12
72
check inactive $vg mirror123
73
check active $vg mirror12
81
check active $vg origin1
82
check active $vg s_napshot2
83
check active $vg linear1
84
check active $vg linear2
85
check active $vg linear12
86
check active $vg mirror12
87
check active $vg mirror123