1 # check write journal of raid456
4 test_detail_shows_journal() {
5 mdadm -D $1 | grep journal || {
6 echo >&2 "ERROR --detail does show journal device!"; mdadm -D $1 ; exit 1; }
10 test_examine_shows_journal() {
11 mdadm -E $1 | grep Journal || {
12 echo >&2 "ERROR --examine does show Journal device!"; mdadm -E $1 ; exit 1; }
16 create_with_journal_and_stop() {
17 mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3 --write-journal $dev4
20 ./raid6check $md0 0 0 | grep 'Error detected' && exit 1
21 test_detail_shows_journal $md0
22 test_examine_shows_journal $dev4
28 create_with_journal_and_stop
29 if mdadm -A $md0 $dev0 $dev1 $dev2 $dev3
31 echo >&2 "ERROR should return 1 when journal is missing!"; cat /proc/mdstat ; exit 1;
35 mdadm -A $md0 $dev0 $dev1 $dev2 $dev3 --force
42 create_with_journal_and_stop
43 for d in $dev0 $dev1 $dev2 $dev3
52 # test --incremental with journal missing
53 for d in $dev0 $dev1 $dev2 $dev3
62 create_with_journal_and_stop