]> git.ipfire.org Git - thirdparty/mdadm.git/blob - tests/01r5integ
test: add --disable-integrity switch.
[thirdparty/mdadm.git] / tests / 01r5integ
1
2 # Check integrity of raid5 in degraded mode
3 # Create a 4 disk raid5, create a filesystem and
4 # sha1sum it with each device failed
5
6 if [ "$INTEGRITY" != "yes" ]; then
7 echo -ne 'skipping... '
8 exit 0
9 fi
10
11 for layout in ls rs la ra
12 do
13 mdadm -CR $md0 -l5 --layout $layout -n4 $dev0 $dev1 $dev2 $dev3
14 check wait
15 tar cf - /etc > $md0
16 sum=`sha1sum $md0`
17
18 for i in $dev0 $dev1 $dev2 $dev3
19 do
20 mdadm $md0 -f $i
21 mdadm $md0 -r $i
22 blockdev --flushbufs $md0
23 sum1=`sha1sum $md0`
24 if [ "$sum" != "$sum1" ]
25 then
26 echo $sum does not match $sum1 with $i missing
27 exit 1
28 fi
29 mdadm $md0 -a $i
30 check wait
31 done
32 mdadm -S $md0
33 done
34