]> git.ipfire.org Git - thirdparty/mdadm.git/blame - tests/07autodetect
Stop managed arrays more carefully.
[thirdparty/mdadm.git] / tests / 07autodetect
CommitLineData
1f48664b
NB
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
54097ce7
NB
8if lsmod | grep md_mod > /dev/null 2>&1
9then
10 echo md is a module - cannot test autodetect
11 exit 0
12fi
13
14
1f48664b
NB
15mdadm -CR $mdp0 -l0 -f -n1 $dev0
16mdadm -CR $mdp1 -l0 -f -n1 $dev1
17sfdisk $mdp0 >&2 << END
18,,FD
19END
20sfdisk $mdp1 >&2 << END
21,,FD
22END
23mdadm -CR $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1
24check resync
25check raid1
26check wait
27mdadm -S $md0
28mdadm --auto-detect
29check raid1
30
31mdadm -Ss
32exit 0