Configuring a RAID1 array on Linux is widely (and I think sometimes even correctly) described on the internets, as is how to mark a drive as faulty.

What nobody discusses is whether and how to mirror the EPS partition, how to detect / be alerted when a disk becomes faulty, or how to actually boot from the other drive if all one has are two drives in a simple configuration.

On to the other hand, and to be fair, internet search has become so shit it's pathetic.

@jpmens I use this for keeping the content of the ESPs in sync: https://github.com/gregory-lee-bartholomew/bootsync
GitHub - gregory-lee-bartholomew/bootsync: Keep ESPs synchronized on mirrored-disk systems

Keep ESPs synchronized on mirrored-disk systems. Contribute to gregory-lee-bartholomew/bootsync development by creating an account on GitHub.

GitHub
@kevin @jpmens I think @youam was saying the other day, you can just do a "real" RAID with metadata format 1.0 so it puts the stuff at the *end* of the partition and UEFI is not confused.
@zhenech @jpmens @youam That's an interesting idea!
@kevin @zhenech @jpmens yup, it boils down to: `mdadm --create /dev/md/efiboot --raid-devices=2 --level=1 --bitmap=internal --name=efiboot /dev/sdX2 /dev/sdY2 --metadata=1.0`
@youam @kevin @zhenech so, if you can forgive my ignorance, AFTER that I would do some grub magic to actually write into /dev/md/efiboot with the correct data which MD would then RAID1, since MD cannot know which partition currently contains the real deal.
@jpmens @youam @kevin huh? You mount /dev/md/efiboot on /boot/EFI and your OS will use that to store the bootloader. If that's an existing system, you'd have to move the old contents of /boot/EFI there once, so the whole deal becomes: backup /boot/EFI, do mdadm magic, mkfs.vfat /dev/md/efiboot, mount /dev/md/efiboot /boot/EFI, restore backup, edit /etc/fstab - I am sure you can do this

@zhenech @youam @kevin I was assuming an existing system with an ESP into which grub had installed its stuff.

I also assumed, that if I create an MD on top of that ESP device (and its counterpart on disk 2), that I'd have to grub-install again.

Thanks for clarifying and, yes, I ought to manage that

@jpmens @youam @kevin the nice thing with UEFI is that you don't have to "hide" Grub in some obscure section of the MBR but only copy a few files with the right names to a VFAT formatted disk.
@zhenech @jpmens @youam Indeed, this is a huge improvement. I use systemd-boot instead of GRUB but the technique should be the same.