Subject: Re: bug#40999: GRUB prevents booting a degraded RAID1 array atop LUKS

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 27 Mar 2022 00:07:34 -0400

Hi,

[email-masked] writes:

> On a system where:
>
> 1) Each disks comprising the array is fully LUKS encrypted
> 2) Each mapped disk is made part of a Btrfs RAID1 array
>
> When attempting to boot the system after pulling out (in BIOS or using
> the cable) the drive to simulate a complete disk failure, GRUB hangs,
> prompting for the LUKS password of the disappeared drive and
> (unsurprisingly) failing to open it.
>
> This prevents booting in a degraded LUKS encrypted, Btrfs RAID1 on Guix
> System.

It seems this is a problem not unknown to other (non-Btrfs) software
RAID as well, such as mdadm.  There was recently a fix for it in Ubuntu
[0].  It can probably provide cues about how to go to fix it in Guix
System.

[0]  https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1879980