disable mdadm auto assembling of isw and ddf metadata devices

This commit is contained in:
Tobias Powalowski 2013-08-21 09:02:19 +02:00
parent 9f3ea7681a
commit 30a6f0745a
7 changed files with 82 additions and 39 deletions

View file

@ -8,10 +8,10 @@ FILES=""
# SETUP
#
# Please change the hooks only if you know what you are doing.
HOOKS="arch_fb dmraid arch_base arch_core_install arch_installer arch_bootmessage_allinone arch_tz arch_keymap \
HOOKS="arch_fb arch_base arch_core_install arch_installer arch_bootmessage_allinone arch_tz arch_keymap \
arch_acpi arch_motd arch_memtest arch_linux_firmware arch_intel_wireless \
arch_hwdetect block memdisk arch_pcspkr arch_net arch_isdn pcmcia \
arch_sound keyboard arch_devicemapper arch_mdadm arch_lvm2 \
arch_sound keyboard dmraid arch_devicemapper arch_mdadm arch_lvm2 \
encrypt arch_cryptoloop btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd \
arch_pppoe arch_grub arch_refind arch_gummiboot arch_efibootmgr arch_syslinux arch_iptables arch_pciutils arch_usbutils \
arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_wireless_staging \

View file

@ -8,11 +8,11 @@ FILES=""
# SETUP
#
# Please change the hooks only if you know what you are doing.
HOOKS="arch_fb dmraid arch_base arch_network_install arch_installer arch_tz arch_keymap \
HOOKS="arch_fb arch_base arch_network_install arch_installer arch_tz arch_keymap \
arch_acpi arch_bootmessage arch_motd arch_memtest \
arch_linux_firmware arch_intel_wireless arch_hwdetect block memdisk \
arch_pcspkr arch_net arch_isdn pcmcia arch_sound keyboard \
arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop btrfs \
dmraid arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop btrfs \
arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd arch_pppoe \
arch_grub arch_refind arch_gummiboot arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \
arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses \

View file

@ -8,11 +8,11 @@ FILES=""
# SETUP
#
# Please change the hooks only if you know what you are doing.
HOOKS="arch_fb dmraid arch_base arch_network_install arch_installer arch_tz arch_keymap \
HOOKS="arch_fb arch_base arch_network_install arch_installer arch_tz arch_keymap \
arch_acpi arch_bootmessage arch_motd arch_memtest \
arch_linux_firmware arch_intel_wireless arch_hwdetect block memdisk \
arch_pcspkr arch_net arch_isdn pcmcia arch_sound keyboard \
arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop \
dmraid arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop \
btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd \
arch_pppoe arch_grub arch_refind arch_gummiboot arch_efibootmgr arch_syslinux arch_iptables \
arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools \

View file

@ -8,11 +8,11 @@ FILES=""
# SETUP
#
# Please change the hooks only if you know what you are doing.
HOOKS="arch_fb dmraid arch_base arch_core_install arch_installer arch_tz arch_keymap \
HOOKS="arch_fb arch_base arch_core_install arch_installer arch_tz arch_keymap \
arch_acpi arch_bootmessage arch_motd arch_memtest \
arch_linux_firmware arch_intel_wireless arch_hwdetect block memdisk \
arch_pcspkr arch_net arch_isdn pcmcia arch_sound keyboard \
arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop btrfs \
dmraid arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop btrfs \
arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd arch_pppoe \
arch_grub arch_refind arch_gummiboot arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \
arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless \

View file

@ -8,11 +8,11 @@ FILES=""
# SETUP
#
# Please change the hooks only if you know what you are doing.
HOOKS="arch_fb dmraid arch_base arch_core_install arch_installer arch_tz arch_keymap \
HOOKS="arch_fb arch_base arch_core_install arch_installer arch_tz arch_keymap \
arch_acpi arch_bootmessage arch_motd arch_memtest \
arch_linux_firmware arch_intel_wireless arch_hwdetect block memdisk \
arch_pcspkr arch_net arch_isdn pcmcia arch_sound keyboard \
arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop btrfs \
dmraid arch_devicemapper arch_mdadm arch_lvm2 encrypt arch_cryptoloop btrfs \
arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd \
arch_pppoe arch_grub arch_refind arch_gummiboot arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \
arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless \

View file

@ -7,39 +7,14 @@ build ()
add_binary "mdassemble"
add_binary "mdadm"
add_binary "mdmon"
# check if a custom mdadm.conf exists
if grep -q ^ARRAY /etc/mdadm.conf; then
echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
add_file "/etc/mdadm.conf"
fi
# add custom archboot mdadm.conf to avoid mdadm handling isw and ddf metadata devices
# which are also covered by dmraid
add_file "/usr/share/archboot/mdadm/etc/mdadm.conf" "/etc/mdadm.conf"
}
help ()
{
cat<<HELPEOF
This hook loads the necessary modules for any raid root device,
and assembles the raid device when run.
If arrays are defined in /etc/mdadm.conf, the file will be used instead
of command line assembling.
Command Line Setup:
- for raid arrays with persistent superblocks:
md=<md device no.>,dev0,dev1,...,devn
md=<md device no.>,uuid
- for partitionable raid arrays with persistent superblocks:
md=d<md device no.>,dev0,dev1,...,devn
md=d<md device no.>,uuid
Parameters:
- <md device no.> = the number of the md device:
0 means md0, 1 means md1, ...
- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
or 0900878d:f95f6057:c39a36e9:55efa60a
Examples:
- md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
This will setup 2 md partitionable arrays.
- md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
This will setup 2 md arrays with persistent superblocks.
This hook adds mdadm to arch boot image.
HELPEOF
}

View file

@ -0,0 +1,68 @@
# mdadm configuration file
#
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
#
#
# the config file takes two types of lines:
#
# DEVICE lines specify a list of devices of where to look for
# potential member disks
#
# ARRAY lines specify information about how to identify arrays so
# so that they can be activated
#
# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1
#DEVICE /dev/hda1 /dev/hdb1
#
AUTO -imsm -ddf
# The designation "partitions" will scan all partitions found in
# /proc/partitions
DEVICE partitions
# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#
# super-minor is usually the minor number of the metadevice
# UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#
# mdadm -D <md>
#
# To capture the UUIDs for all your RAID arrays to this file, run these:
# to get a list of running arrays:
# # mdadm -D --scan >>/etc/mdadm.conf
# to get a list from superblocks:
# # mdadm -E --scan >>/etc/mdadm.conf
#
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
#
# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a
# failed drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
#
# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program. To start mdadm's monitor mode, enable
# mdadm.service in systemd.
#
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld
#PROGRAM /usr/sbin/handle-mdadm-events