Red Hat Bugzilla – Bug 610878
mdadm blocks on boot if initrams doesn't support latest superblock of a new encrypted md device
Last modified: 2010-07-20 12:28:20 EDT
Description of problem:
mdadm blocks on boot when missing the mirror of an encrypted raid 1 array, and initramfs/dracut wasn't able to bring the md device up.
Version-Release number of selected component (if applicable):
Fedora 13, as of July 02.
- machine has multiple md devices
- one of the md devices gets deleted and recreated
for maintenance/data move purposes
- new md partition formatted with luks encryption, inside ext4
- /etc/mdadm.conf updated manually to contain the new UUID
- all old md devices had an old style superblock
(no superblock version number in /proc/mdstat)
- the new md device reports "super 1.2"
- /etc/crypttab contains an entry for the device
name /dev/md0 none
- /etc/fstab contains an entry to mount it
- keeping the old kernel and initramfs, I can boot up just fine,
I get prompted for password and it gets mounted
- remove mirror drive
- dracut unable to bring up md0
- prompt shown "enter password for /home"
- computer is blocked. pressing keys or enter => nothing happens on screen
- boot process blocks with missing mirror device
- mdadm should report some failure and not block
Thanks to Harald for helping me diagnose the problem.
I'll attach both old and new mdadm.conf
I'm not sure if you need to see the actual mdadm.conf
The only difference is, the /dev/md0 configuration line was changed to have a new UUID.
There are additional steps necessary to do what you want. Specifically, the device uuid for the root array is specified on the grub boot line as a boot parameter. So not only do you need to update the mdadm.conf file with the new uuid, you also need to modify /etc/grub.conf to reflect the new uuid so that dracut will look for it. If you don't, then what's happening is when you boot with the old drive removed, the old uuid specified on the grub boot command is simply not present and so no device is started. The reason mdadm doesn't issue an error is that mdadm is never invoked. Dracut scans for the old uuid, doesn't find it, never invokes mdadm, and then says it can't find the boot device and sleeps forever. Simply updating the grub.conf file should solve your problem. If it doesn't, then reopen the bug.