Cannot boot degraded RAID1 array with LUKS partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
initramfs-tools-ubuntu-core (Ubuntu) |
Invalid
|
Critical
|
Bert |
Bug Description
When pulling out a disk on my 12.04.2 RAID1 setup, which contains a LUKS container inside an md device, my system won't boot. Plugging the second disk back in worked, but I wanted to replace my disks, and if a disk is broken you don't have that option...
Debugging the initramfs boot sequence seems to indicate that the crypto handling is done before degraded array handing, rendering the BOOTDEGRADED flag ineffective.
I've looked at other bugs (#1077650 #1003309 #728435 #106215) but I think it's a different problem.
Situation
I've got a LVM-in-
# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md126 : active raid1 sda2[0] sdb2[2]
523968 blocks super 1.2 [2/2] [UU]
md127 : active raid1 sda1[0] sdb1[2]
976106048 blocks super 1.2 [2/2] [UU]
unused devices: <none>
md127 contains a LUKS container, called ugh2_lvm.
ugh2_lvm contains an LVM with a volume group called ugh2_vg.
ugh2_vg contains LV's called "root" (the root filesystem) and "swap".
# mount | grep /dev/m
/dev/mapper/
/dev/md126 on /boot type ext4 (rw)
# cat crypttab
ugh2_lvm UUID=69ade3d3-
# grep 'DEGRADED=' /etc/initramfs-
BOOT_DEGRADED=true
Symptoms
Booting seems to hang with a message "evms_activate is not available". I'm not using EVMS so the message is not really indicative of the problem. Perhaps you get dropped to a shell after a lot of time (3 minutes? I saw a time-out of 180 seconds in the scripts somewhere) but that took too long for me.
Diagnosis
Interrupting the boot process with break=premount let me take a look at the situation. Turns out the degraded arrays assembled, but inactive; the BOOT_DEGRADED handling activates the degraded arrays (scripts/
Workaround / solution
I made it work again by linking /usr/share/
It seems to work well. Not sure if it's the best or even a clean approach.
tags: | added: utopic |
Changed in initramfs-tools (Ubuntu): | |
importance: | Undecided → Critical |
affects: | initramfs-tools (Ubuntu) → initramfs-tools-ubuntu-core (Ubuntu) |
Changed in initramfs-tools-ubuntu-core (Ubuntu): | |
assignee: | nobody → Bert (bertdieltjens) |
Forgot to mention that booting from a degraded array did work when I installed the system (12.04 RC2). That was slightly different - in that setup, I created the setup degraded. I added the other disk afterwards.