2 # Check integrity of raid6 in degraded modes
3 # Create a 5 disk raid6, dump some data to it, then
4 # sha1sum it with different pairs of devices failed
6 if [ "$INTEGRITY" != "yes" ]; then
7 echo -ne 'skipping... '
13 if expr $lv '>=' 2.6.30 > /dev/null
15 layouts="$layouts parity-first ddf-zero-restart ddf-N-restart ddf-N-continue \
16 left-asymmetric-6 right-asymmetric-6 left-symmetric-6 right-symmetric-6 parity-first-6"
19 for layout in $layouts
21 mdadm -CR $md0 -l6 --layout $layout -n5 $dev0 $dev1 $dev2 $dev3 $dev4
27 for second in $dev0 $dev1 $dev2 $dev3 $dev4
31 blockdev --flushbufs $md0
33 if [ "$sum" != "$sum1" ]
35 echo $sum does not match $sum1 with $second missing
42 blockdev --flushbufs $md0
44 if [ "$sum" != "$sum1" ]
46 echo $sum does not match $sum1 with $first and $second missing
50 while ! (check state 'U*_U*'); do check wait; sleep 0.2; done
53 while ! (check state 'U*'); do check wait; sleep 0.2; done
54 totest="$totest $second"