Tests should calucalte expected array_size accordingly to raid level. Also
tests should take care about runding to neares MB introduced from b53bfba6
"imsm: use rounded size for metadata initialization".
Expect proper size in tests. Simplify 09imsm-overlap test by creating array
with size which has not been rounded. Main purpose of this test is checking
something else.
Signed-off-by: Michal Zylowski <michal.zylowski@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
29 lines
987 B
Plaintext
29 lines
987 B
Plaintext
|
|
. 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=1024
|
|
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+4096))
|
|
imsm_check member $member1 $num_disks $level $size 1024 $offset
|
|
offset=$((offset+size+4096))
|
|
imsm_check member $member2 $num_disks $level $size 1024 $offset
|
|
offset=$((offset+size+4096))
|
|
imsm_check member $member3 $num_disks $level $size 1024 $offset
|
|
offset=$((offset+size+4096))
|
|
imsm_check member $member4 $num_disks $level $size 1024 $offset
|