]> git.ipfire.org Git - thirdparty/mdadm.git/blame - tests/07autodetect
Create: support --readonly flag.
[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
7d5c3964
N
15mdadm -CR -e 0 $mdp0 -l0 -f -n1 $dev0
16mdadm -CR -e 0 $mdp1 -l0 -f -n1 $dev1
8d848be1 17udevadm settle
1f48664b
NB
18sfdisk $mdp0 >&2 << END
19,,FD
20END
21sfdisk $mdp1 >&2 << END
22,,FD
23END
8d848be1 24udevadm settle
7d5c3964 25mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1
1f48664b
NB
26check resync
27check raid1
28check wait
29mdadm -S $md0
30mdadm --auto-detect
31check raid1
32
33mdadm -Ss
34exit 0