diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/autodetect | 3 | ||||
-rw-r--r-- | install/raid | 32 |
2 files changed, 24 insertions, 11 deletions
diff --git a/install/autodetect b/install/autodetect index 6cf252c..73d8a21 100644 --- a/install/autodetect +++ b/install/autodetect @@ -7,7 +7,8 @@ install () AUTODETECT="$(auto_modules -e "/scsi/" -e "/block" -e "/fusion/" \ -e "/usb/" -e "/ide/" -e "/ieee1394/" -e "/cdrom"\ -e "/net/" -e "/pcmcia") - $(cat /proc/filesystems | grep -v nodev) " + $(cat /proc/filesystems | grep -v nodev) \ + $(mdadm -E -s /dev/hd* /dev/sd* | awk -Flevel= '{print $2}' | awk '{print $1}') " for m in $AUTODETECT; do modname="$(basename ${m%%\.ko})" diff --git a/install/raid b/install/raid index 84339c5..a7102b6 100644 --- a/install/raid +++ b/install/raid @@ -2,7 +2,7 @@ install () { - MODULES=" $(all_modules "/md/raid*")" + MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") " BINARIES="" FILES="" SCRIPT="raid" @@ -15,15 +15,27 @@ cat<<HELPEOF This hook loads the necessary modules for an raid root device, and assemble the raid device when run. - Supported Kernel Parameters: - * raid=noautodetect : This setting is only effective if set to - noautodetect. When set to noautodetect, the md= parameter is used. - * md= ::: TODO ::: md=0,/dev/sda3,/dev/sda4 + Kernel Parameters: + Specify all your md arrays with md= parameter: + ::: Example ::: md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1 + This will setup 2 md arrays with persistent superblocks - Important Note: kinit handles raid assembly by itself. If you - do not need to run any additional hooks on the assembled array - (i.e. LVM, encrypted root, etc), it is recommended that you - let kinit handle the assembly. You will still need to load - the proper raid* modules via the MODULES setting. + Setup: + - for old raid arrays without persistent superblocks: + md=<md device no.>,<raid level>,<chunk size factor>,<fault level>,dev0,dev1 + - for raid arrays with persistent superblocks: + md=<md device no.>,dev0,dev1,...,devn + - for, to assemble a partitionable array: + md=d<md device no.>,dev0,dev1,...,devn + + Parameters: + - <md device no.> = the number of the md device: + 0 means md0, 1 means md1, ... + - <raid level> = -1 linear mode, 0 striped mode + other modes are only supported with persistent super block + - <chunk size factor> = (raid-0 and raid-1 only): + Set the chunk size as 4k << n. + - <fault level> = totally ignored + - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1 HELPEOF } |