mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +02:00
'fixed md_mod loading'
This commit is contained in:
parent
43fdb29d8a
commit
7a5ff67915
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue