updated on Tue Jan 10 08:08:34 UTC 2012
[aur-mirror.git] / mdadm-git / mdadm_install
blobb7a57ea4ec54f05d6b4ad9ffb8364bb83adfabb1
1 # vim: set ft=sh:
3 install ()
5     MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
6     BINARIES=""
7     FILES=""
8     SCRIPT="mdadm"
9     # check if a custom mdadm.conf exists
10     if grep -q ^ARRAY /etc/mdadm.conf; then
11         echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
12         add_file "/etc/mdadm.conf"
13     fi
14     add_binary "/sbin/mdassemble"
15     add_file "/lib/udev/rules.d/64-md-raid.rules"
18 help ()
20 cat<<HELPEOF
21   This hook loads the necessary modules for any raid root device,
22   and assembles the raid device when run.
24   If arrays are defined in /etc/mdadm.conf, the file will be used instead
25   of command line assembling.
26   
27   Command Line Setup:
28   - for raid arrays with persistent superblocks:
29     md=<md device no.>,dev0,dev1,...,devn
30     md=<md device no.>,uuid
31   - for partitionable raid arrays with persistent superblocks:
32     md=d<md device no.>,dev0,dev1,...,devn
33     md=d<md device no.>,uuid
35   Parameters:
36   - <md device no.> = the number of the md device: 
37     0 means md0, 1 means md1, ...
38   - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
39                    or 0900878d:f95f6057:c39a36e9:55efa60a
40   Examples:
41   - md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
42     This will setup 2 md partitionable arrays.
43   - md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
44     This will setup 2 md arrays with persistent superblocks.
45 HELPEOF