diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/mdadm/raid-partitions_hook | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core/mdadm/raid-partitions_hook')
-rw-r--r-- | abs/core/mdadm/raid-partitions_hook | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/abs/core/mdadm/raid-partitions_hook b/abs/core/mdadm/raid-partitions_hook new file mode 100644 index 0000000..bed1cb2 --- /dev/null +++ b/abs/core/mdadm/raid-partitions_hook @@ -0,0 +1,21 @@ +# vim: set ft=sh: +run_hook () +{ + #TODO scan for these somehow... + /sbin/modprobe -aq linear multipath raid0 raid1 raid456 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 + for i in $(replace $(echo $md) ',' ' '); do + case $i in d[0-9]) + for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do + /sbin/mdadm --create -a mdp /dev/md_d$i >/dev/null 2>&1 + done + mdadm --assemble --auto=mdp /dev/md_$(replace $(echo $md) ',' ' ') + export USE_RAID_ARRAY=1 + ;; + esac + done + if ! [ "$USE_RAID_ARRAY" = "1" ] ; then + /bin/mdassemble ${CMDLINE} + fi +} |