summaryrefslogtreecommitdiff
path: root/tests/09imsm-overlap
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-12-20 08:48:44 +0000
committerMichael Tokarev <mjt@tls.msk.ru>2014-12-20 08:48:44 +0000
commit489bea7ee8e1dbecfa517b8415568044ab57c73a (patch)
tree44d4878d4c7da3f4908ea9a765ef9b8f9c141756 /tests/09imsm-overlap
mdadm (3.3.2-5) unstable; urgency=medium
* use-tempnode-not-devnode.patch: change udev rules file to use $tempnode which works both on wheezy and jessie udev, instead of $devnode which only works in jessie. At this stage it is better to make rules file compatible with old version instead of adding versioned dependency. Should be removed for jessie+1. (Closes: #770883) * fix Closes: list in previous entry (Closes: #771852) # imported from the archive
Diffstat (limited to 'tests/09imsm-overlap')
-rw-r--r--tests/09imsm-overlap30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/09imsm-overlap b/tests/09imsm-overlap
new file mode 100644
index 0000000..e832257
--- /dev/null
+++ b/tests/09imsm-overlap
@@ -0,0 +1,30 @@
+
+. tests/env-imsm-template
+
+# create raid arrays with varying degress of overlap
+mdadm -CR $container -e imsm -n 6 $dev0 $dev1 $dev2 $dev3 $dev4 $dev5
+imsm_check container 6
+
+size=1910
+level=1
+num_disks=2
+mdadm -CR $member0 $dev0 $dev1 -n $num_disks -l $level -z $size
+mdadm -CR $member1 $dev1 $dev2 -n $num_disks -l $level -z $size
+mdadm -CR $member2 $dev2 $dev3 -n $num_disks -l $level -z $size
+mdadm -CR $member3 $dev3 $dev4 -n $num_disks -l $level -z $size
+mdadm -CR $member4 $dev4 $dev5 -n $num_disks -l $level -z $size
+
+udevadm settle
+
+offset=0
+imsm_check member $member0 $num_disks $level $size 1024 $offset
+offset=$((offset+size+2048))
+imsm_check member $member1 $num_disks $level $size 1024 $offset
+offset=$((offset+size+2048))
+imsm_check member $member2 $num_disks $level $size 1024 $offset
+# at this point there should be more freespace at the start of the disk
+# than the end
+offset=0
+imsm_check member $member3 $num_disks $level $size 1024 $offset
+offset=$((offset+size+2048))
+imsm_check member $member4 $num_disks $level $size 1024 $offset