diff --git a/etc/archboot/allinone.conf b/etc/archboot/allinone.conf index efb7aa59d..d7fb8f335 100644 --- a/etc/archboot/allinone.conf +++ b/etc/archboot/allinone.conf @@ -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 \ diff --git a/etc/archboot/default-network-pxelinux.conf b/etc/archboot/default-network-pxelinux.conf index d5282a71f..7e44e4074 100644 --- a/etc/archboot/default-network-pxelinux.conf +++ b/etc/archboot/default-network-pxelinux.conf @@ -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 \ diff --git a/etc/archboot/default-network.conf b/etc/archboot/default-network.conf index 3edbdc6bd..5027d5760 100644 --- a/etc/archboot/default-network.conf +++ b/etc/archboot/default-network.conf @@ -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 \ diff --git a/etc/archboot/default-pxelinux.conf b/etc/archboot/default-pxelinux.conf index f4ad7fd33..577809b28 100644 --- a/etc/archboot/default-pxelinux.conf +++ b/etc/archboot/default-pxelinux.conf @@ -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 \ diff --git a/etc/archboot/default.conf b/etc/archboot/default.conf index 06cc5a245..519ab64f2 100644 --- a/etc/archboot/default.conf +++ b/etc/archboot/default.conf @@ -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 \ diff --git a/usr/lib/initcpio/install/arch_mdadm b/usr/lib/initcpio/install/arch_mdadm index 855538495..063e21d35 100644 --- a/usr/lib/initcpio/install/arch_mdadm +++ b/usr/lib/initcpio/install/arch_mdadm @@ -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<,dev0,dev1,...,devn - md=,uuid - - for partitionable raid arrays with persistent superblocks: - md=d,dev0,dev1,...,devn - md=d,uuid - - Parameters: - - = the number of the md device: - 0 means md0, 1 means md1, ... - - : 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 } diff --git a/usr/share/archboot/mdadm/etc/mdadm.conf b/usr/share/archboot/mdadm/etc/mdadm.conf new file mode 100644 index 000000000..5473eff02 --- /dev/null +++ b/usr/share/archboot/mdadm/etc/mdadm.conf @@ -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 +# +# 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