3

According to this tutorial:

http://edoceo.com/howto/mdadm-raid1

as well as the answer to this question,

...it is necessary to create a separate boot partition if you want to boot from a software RAID 1 array on Linux (an array created via mdadm). My question is:

  1. Is this correct?
  2. If so, why is this necessary? Why can't there be a single primary bootable partition (mounted on /) on both drives in the RAID 1 array?

1 Answer 1

2

It is generally true that you need a separate /boot unless you want to boot the system on a single of the two RAID1 disks and then remount as md after the system is running or set up an appropriate initramfs.

From mdadm wiki:

Since support for MD is found in the kernel, there is an issue with using it before the kernel is running. Specifically it will not be present if the boot loader is either (e)LiLo or GRUB legacy. It may not be present for GRUB 2. In order to circumvent this problem a /boot filesystem must be used either without md support, or else with RAID1. In the latter case the system will boot by treating the RAID1 device as a normal filesystem, and once the system is running it can be remounted as md and the second disk added to it. This will result in a catch-up, but /boot filesystems are usually small.

With more recent bootloaders it is possible to load the MD support as a kernel module through the initramfs mechanism, this approach allows you to let the /boot filesystem be inside any RAID system without the need of a complex manual configuration.

Although it isn't your question, it may be useful to consult RAID Boot for more information on using initramfs to start a system booting from md volumes.

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .