'fixed md_mod loading'

This commit is contained in:
Tobias Powalowski 2009-03-29 11:12:38 +02:00
parent 43fdb29d8a
commit 7a5ff67915
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,8 @@ run_hook ()
{
input="$(cat /proc/cmdline)"
mdconfig="/etc/mdadm.conf"
# for partitionable raid, we need to load md_mod first!
modprobe md_mod 2>/dev/null
# if no config file is present create one from command line parameters
if ! [ -e $mdconfig ]; then
#Create initial mdadm.conf

View file

@ -669,7 +669,7 @@ storage is duplication." 0 0
SPARE_DEVICES="$(cat /tmp/.raid-spare | wc -l)"
# generate options for mdadm
RAIDOPTIONS="--force --run --level=$LEVEL"
[ "$(echo $RAIDDEVICE | grep /md_d[0-9])" ] && RAIDOPTIONS="$RAIDOPTIONS -a mdp" && modprobe md_mod 2>/dev/null
[ "$(echo $RAIDDEVICE | grep /md_d[0-9])" ] && RAIDOPTIONS="$RAIDOPTIONS -a mdp"
! [ "$RAID_DEVICES" = "0" ] && RAIDOPTIONS="$RAIDOPTIONS --raid-devices=$RAID_DEVICES"
! [ "$SPARE_DEVICES" = "0" ] && RAIDOPTIONS="$RAIDOPTIONS --spare-devices=$SPARE_DEVICES"
! [ "$PARITY" = "" ] && RAIDOPTIONS="$RAIDOPTIONS --layout=$PARITY"