summaryrefslogtreecommitdiffstats
path: root/test/shell/lvcreate-raid.sh
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2012-08-24 15:34:19 -0500
committerJonathan Brassow <jbrassow@redhat.com>2012-08-24 15:34:19 -0500
commit4047e4dfb16175daec348bf44032c02181bd4c70 (patch)
treec65d274f9d8058e77771d439652d49c7af9d4c6b /test/shell/lvcreate-raid.sh
parent99d1e264a87eb256debe2eaa02d9fc4e2b08c815 (diff)
downloadlvm2-4047e4dfb16175daec348bf44032c02181bd4c70.tar.gz
lvm2-4047e4dfb16175daec348bf44032c02181bd4c70.tar.xz
lvm2-4047e4dfb16175daec348bf44032c02181bd4c70.zip
RAID: Add support for RAID10
This patch adds support for RAID10. It is not the default at this stage. The user needs to specify '--type raid10' if they would like RAID10 instead of stacked mirror over stripe.
Diffstat (limited to 'test/shell/lvcreate-raid.sh')
-rw-r--r--test/shell/lvcreate-raid.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/shell/lvcreate-raid.sh b/test/shell/lvcreate-raid.sh
index c26f6943..81e5a5db 100644
--- a/test/shell/lvcreate-raid.sh
+++ b/test/shell/lvcreate-raid.sh
@@ -16,7 +16,7 @@
########################################################
aux target_at_least dm-raid 1 1 0 || skip
-aux prepare_pvs 5 20
+aux prepare_pvs 6 20 # 6 devices for RAID10 (2-mirror,3-stripe) test
vgcreate -c n -s 512k $vg $(cat DEVICES)
###########################################
@@ -49,5 +49,24 @@ for i in raid4 \
done
#
+# Create RAID10:
+#
+
+aux target_at_least dm-raid 1 3 0 || skip
+
+# Should not allow more than 2-way mirror
+not lvcreate --type raid10 -m 2 -i 2 -l 2 -n $lv1 $vg
+
+# 2-way mirror, 2-stripes
+lvcreate --type raid10 -m 1 -i 2 -l 2 -n $lv1 $vg
+aux wait_for_sync $vg $lv1
+lvremove -ff $vg
+
+# 2-way mirror, 3-stripes
+lvcreate --type raid10 -m 1 -i 3 -l 3 -n $lv1 $vg
+aux wait_for_sync $vg $lv1
+lvremove -ff $vg
+
+#
# FIXME: Add tests that specify particular PVs to use for creation
#