mdadm/tests/07autodetect
NeilBrown 7d5c3964cc Change default metadata from 0.90 to 1.1
1.1 is more flexible in a number of ways and is safer.
0.90 is still fully supported.
1.0 should possibly be used for RAID1 arrays that you
want to boot off, depending on your boot loader.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-11-17 13:15:32 +11:00

33 lines
585 B
Plaintext

#
# Test in-kernel autodetect.
# Create a partitionable array on each of two devices,
# put a partition on each, create an array, and see if we can
# use autodetect to restart the array.
if lsmod | grep md_mod > /dev/null 2>&1
then
echo md is a module - cannot test autodetect
exit 0
fi
mdadm -CR -e 0 $mdp0 -l0 -f -n1 $dev0
mdadm -CR -e 0 $mdp1 -l0 -f -n1 $dev1
sfdisk $mdp0 >&2 << END
,,FD
END
sfdisk $mdp1 >&2 << END
,,FD
END
mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1
check resync
check raid1
check wait
mdadm -S $md0
mdadm --auto-detect
check raid1
mdadm -Ss
exit 0