Raid 10 configuration, booting from any drive

Kernels & Hardware, configuring network, installing services

Raid 10 configuration, booting from any drive

Postby ormsky » 2018-01-17 11:28

Hi,

I'm setting up a raid 10 installation with 4 drives, using the Debian installer on a bootable usb stick. On each drive, I've got two partitions:
1 = EFI bootable system
2 = Raid

I add the Raid partitions to a Raid 10 array, then configure a logical volume group with swap and ext4 root volumes.
The installer sets everything up nicely and installs grub-efi on the first drive. When I reboot everything works as expected.

I then repeat the following for drives 2-4 (b-d) where <X> is the drive letter to install grub on each drive:
umount /boot/efi
mount /dev/sd<X>1 /boot/efi
grub-install --ef-directory=/boot/efi /dev/sd<X>

After doing the above, I wanted to check that I could boot from any drive other that the first one.
I failed drive 'a', then removed it from the raid array. I physically removed the drive and then rebooted.
The system tried to reboot, but failed because it tries to mount /dev/sda1 to /boot/efi (using the UUID of the drive).
If I edit the /etc/fstab file and comment out the line that mounts /dev/sda1 to /boot/efi, then I'm able to boot from any drive and the system appears to work normally.

My question is, does /boot/efi need to be mounted? What potential problems do I face if it isn't mounted?
I assume that kernel upgrades will still work since they are in /boot which is in the raid, the only thing under /boot/efi is the efi configuration.

Thanks!
ormsky
 
Posts: 2
Joined: 2018-01-17 11:03

Re: Raid 10 configuration, booting from any drive

Postby p.H » 2018-01-17 16:01

The EFI partition does not need to be mounted for normal operation. It contains the GRUB EFI core image in /boot/efi/EFI/debian/grubx64.efi (for Debian on PC with 64-bit UEFI firmware). So it only needs to be mounted when running grub-install, including when the grub-efi* packages are upgraded.

You can add the "nofail" option in the fstab line to avoid mount failure when the partition is missing. I guess the 90-second delay still happens though.

Notes :
1) For EFI targets the device argument /dev/xxx is meaningless and grub-install ignores it, so it can be omitted.
2) /boot/efi is already the default for --efi-directory, so if you mount each EFI partition on /boot/efi in turn you don't need to specify it.
p.H
 
Posts: 378
Joined: 2017-09-17 07:12

Re: Raid 10 configuration, booting from any drive

Postby ormsky » 2018-01-17 16:15

Great, thanks for the info!
I think I'll leave it unmounted for now.
ormsky
 
Posts: 2
Joined: 2018-01-17 11:03

Re: Raid 10 configuration, booting from any drive

Postby p.H » 2018-01-17 16:23

You can also add the "noauto" option in fstab so that the system does not try to automatically mount the partition.
p.H
 
Posts: 378
Joined: 2017-09-17 07:12


Return to System configuration

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable