]> git.ipfire.org Git - thirdparty/mdadm.git/blob - tests/07autodetect
mapfile: if we putting the mapfile in a custom location via ALT_RUN, allow
[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 sfdisk $mdp0 >&2 << END
18 ,,FD
19 END
20 sfdisk $mdp1 >&2 << END
21 ,,FD
22 END
23 mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1
24 check resync
25 check raid1
26 check wait
27 mdadm -S $md0
28 mdadm --auto-detect
29 check raid1
30
31 mdadm -Ss
32 exit 0