]> git.ipfire.org Git - thirdparty/mdadm.git/blob - tests/01r5integ
97a71f34aefadd3b1a6fe3c98b2fd1c93013c031
[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 for layout in ls rs la ra
7 do
8 mdadm -CR $md0 -l5 --layout $layout -n4 $dev0 $dev1 $dev2 $dev3
9 check wait
10 tar cf - /etc > $md0
11 sum=`sha1sum $md0`
12
13 for i in $dev0 $dev1 $dev2 $dev3
14 do
15 mdadm $md0 -f $i
16 mdadm $md0 -r $i
17 blockdev --flushbufs $md0
18 sum1=`sha1sum $md0`
19 if [ "$sum" != "$sum1" ]
20 then
21 echo $sum does not match $sum1 with $i missing
22 exit 1
23 fi
24 mdadm $md0 -a $i
25 check wait
26 done
27 mdadm -S $md0
28 done
29