Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Raid 10 configuration, booting from any drive

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ormsky
Posts: 2
Joined: 2018-01-17 11:03

Raid 10 configuration, booting from any drive

#1 Post by ormsky »

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!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Raid 10 configuration, booting from any drive

#2 Post by p.H »

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.

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

Re: Raid 10 configuration, booting from any drive

#3 Post by ormsky »

Great, thanks for the info!
I think I'll leave it unmounted for now.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Raid 10 configuration, booting from any drive

#4 Post by p.H »

You can also add the "noauto" option in fstab so that the system does not try to automatically mount the partition.

Post Reply