]> git.ipfire.org Git - thirdparty/mdadm.git/blob - tests/19raid6check
tests: add 19raid6check
[thirdparty/mdadm.git] / tests / 19raid6check
1 #
2 # Confirm that raid6check handles all RAID6 layouts.
3 # Try both 4 and 5 devices.
4
5 layouts='ls rs la ra'
6 lv=`uname -r`
7 if expr $lv '>=' 2.6.30 > /dev/null
8 then
9 layouts="$layouts parity-first ddf-zero-restart ddf-N-restart ddf-N-continue \
10 left-asymmetric-6 right-asymmetric-6 left-symmetric-6 right-symmetric-6 parity-first-6"
11 fi
12
13 for layout in $layouts
14 do
15 for devs in 4 5
16 do
17 dl="$dev0 $dev1 $dev2 $dev3"
18 if [ $devs = 5 ]; then dl="$dl $dev4"; fi
19
20 mdadm -CR $md0 -l6 --layout $layout -n$devs $dl
21 check wait
22 tar cf - /etc > $md0
23 ./raid6check $md0 0 0 | grep 'Error detected' && exit 1
24 mdadm -S $md0
25 done
26 done
27