]> git.ipfire.org Git - thirdparty/mdadm.git/blob - tests/07autodetect
imsm: remove redundant characters from some error messages
[thirdparty/mdadm.git] / tests / 07autodetect
1
2 #
3 # Test in-kernel autodetect.
4 # Create a partitionable array on each of two devices,
5 # put a partition on each, create an array, and see if we can
6 # use autodetect to restart the array.
7
8 if lsmod | grep md_mod > /dev/null 2>&1
9 then
10 echo md is a module - cannot test autodetect
11 exit 0
12 fi
13
14
15 mdadm -CR -e 0 $mdp0 -l0 -f -n1 $dev0
16 mdadm -CR -e 0 $mdp1 -l0 -f -n1 $dev1
17 udevadm settle
18 sfdisk $mdp0 >&2 << END
19 ,,FD
20 END
21 sfdisk $mdp1 >&2 << END
22 ,,FD
23 END
24 udevadm settle
25 mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1
26 check resync
27 check raid1
28 check wait
29 mdadm -S $md0
30 mdadm --auto-detect
31 check raid1
32
33 mdadm -Ss
34 exit 0