~ubuntu-branches/ubuntu/vivid/lvm2/vivid

« back to all changes in this revision

Viewing changes to test/shell/snapshots-of-mirrors.sh

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2012-05-01 20:27:50 UTC
  • mto: (3.1.23 sid)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20120501202750-gljjjtblowwq9mw8
Tags: upstream-2.02.95
ImportĀ upstreamĀ versionĀ 2.02.95

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
 
2
#
 
3
# This copyrighted material is made available to anyone wishing to use,
 
4
# modify, copy, or redistribute it subject to the terms and conditions
 
5
# of the GNU General Public License v.2.
 
6
#
 
7
# You should have received a copy of the GNU General Public License
 
8
# along with this program; if not, write to the Free Software Foundation,
 
9
# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
10
 
 
11
. lib/test
 
12
 
 
13
aux prepare_vg 4
 
14
 
 
15
# Create snapshot of a mirror origin
 
16
lvcreate -m 1 -L 10M -n lv $vg
 
17
lvcreate -s $vg/lv -L 10M -n snap
 
18
 
 
19
# Down-convert (mirror -> linear) under a snapshot
 
20
lvconvert -m0 $vg/lv
 
21
 
 
22
# Up-convert (linear -> mirror)
 
23
lvconvert -m2 $vg/lv
 
24
 
 
25
# Down-convert (mirror -> mirror)
 
26
lvconvert -m1 $vg/lv
 
27
 
 
28
# Up-convert (mirror -> mirror) -- Not supported!
 
29
not lvconvert -m2 $vg/lv
 
30
 
 
31
# Log conversion (disk -> core)
 
32
lvconvert --mirrorlog core $vg/lv
 
33
 
 
34
# Log conversion (core -> mirrored)
 
35
lvconvert --mirrorlog mirrored $vg/lv
 
36
 
 
37
# Log conversion (mirrored -> core)
 
38
lvconvert --mirrorlog core $vg/lv
 
39
 
 
40
# Log conversion (core -> disk)
 
41
lvconvert --mirrorlog disk $vg/lv
 
42
 
 
43
# Clean-up
 
44
lvremove -ff $vg