~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to test/shell/lvcreate-raid10.sh

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2013-03-03 12:33:47 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20130303123347-smfwei6dodkdth55
Tags: 2.02.98-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 2012 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
. lib/test
 
13
 
 
14
########################################################
 
15
# MAIN
 
16
########################################################
 
17
aux target_at_least dm-raid 1 3 0 || skip
 
18
 
 
19
aux prepare_pvs 6 20  # 6 devices for RAID10 (2-mirror,3-stripe) test
 
20
vgcreate -c n -s 512k $vg $(cat DEVICES)
 
21
 
 
22
#
 
23
# Create RAID10:
 
24
#
 
25
 
 
26
 
 
27
# Should not allow more than 2-way mirror
 
28
not lvcreate --type raid10 -m 2 -i 2 -l 2 -n $lv1 $vg
 
29
 
 
30
# 2-way mirror, 2-stripes
 
31
lvcreate --type raid10 -m 1 -i 2 -l 2 -n $lv1 $vg
 
32
aux wait_for_sync $vg $lv1
 
33
lvremove -ff $vg
 
34
 
 
35
# 2-way mirror, 3-stripes
 
36
lvcreate --type raid10 -m 1 -i 3 -l 3 -n $lv1 $vg
 
37
aux wait_for_sync $vg $lv1
 
38
lvremove -ff $vg
 
39
 
 
40
#
 
41
# FIXME: Add tests that specify particular PVs to use for creation
 
42
#