diff options
author | Tobias Powalowski <tpowa@archlinux.org> | 2006-05-07 11:27:26 +0200 |
---|---|---|
committer | Tobias Powalowski <tpowa@archlinux.org> | 2006-05-07 11:27:26 +0200 |
commit | 3c2796fc34d6b5d41c9ff7b4389651bbbe6d018b (patch) | |
tree | ef52d70f0ed030e6aca78ef7add914788ff69499 | |
parent | 212033832a355b6ca1ad61f0f0460cf7b9b07c2d (diff) | |
download | mkinitcpio-3c2796fc34d6b5d41c9ff7b4389651bbbe6d018b.tar.gz mkinitcpio-3c2796fc34d6b5d41c9ff7b4389651bbbe6d018b.tar.xz |
'update the raid stuff + included a raid autodetectcion'
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@77 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | hooks/raid | 2 | ||||
-rw-r--r-- | install/autodetect | 3 | ||||
-rw-r--r-- | install/raid | 32 |
3 files changed, 25 insertions, 12 deletions
@@ -2,7 +2,7 @@ run_hook () { #TODO scan for these somehow... - /bin/modprobe -aq raid0 raid1 raid2 raid5 raid6 >/dev/null 2>&1 + /bin/modprobe -aq linear multipath raid0 raid1 raid5 raid6 raid10>/dev/null 2>&1 # md= can be specified multiple times. The simplistic commandline # parsing does not handle this, so we will let mdassemble parse it /bin/mdassemble ${CMDLINE} 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 } |