]>
Commit | Line | Data |
---|---|---|
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 |
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 | ||
7d5c3964 N |
15 | mdadm -CR -e 0 $mdp0 -l0 -f -n1 $dev0 |
16 | mdadm -CR -e 0 $mdp1 -l0 -f -n1 $dev1 | |
8d848be1 | 17 | udevadm settle |
1f48664b NB |
18 | sfdisk $mdp0 >&2 << END |
19 | ,,FD | |
20 | END | |
21 | sfdisk $mdp1 >&2 << END | |
22 | ,,FD | |
23 | END | |
8d848be1 | 24 | udevadm settle |
7d5c3964 | 25 | mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1 |
1f48664b NB |
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 |