Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting with root filesystem on mdraid RAID-1
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 29 Jul 2011
Posts: 3

PostPosted: Sun Nov 10, 2013 9:08 pm    Post subject: Booting with root filesystem on mdraid RAID-1 Reply with quote

I'm trying to migrate an existing, perfectly functional Gentoo installation to a setup in which the root filesystem is mirrored across two disks using mdadm RAID-1. I am still hoping the reliability gain is worth the headache I'm getting from setting this up.

The system is an amd64 system with legacy BIOS, no EFI.

Steps I've taken so far:
- Set up a new, empty disk with a GPT using gdisk
- 3 partitions: BIOS boot partition (for Grub 2, non-EFI machine), '/boot' and 'rootfs'
- I've created degraded RAID-1 arrays (metadata version 1.2) in the partitions for '/boot' and 'rootfs'.
- I've updated mdadm.conf to include the "devices" (partitions, by PARTUUID) & arrays (output from mdadm --examine etc.).
- I've installed dracut because I need an initramfs to assemble the rootfs array and mount it.

Modifications I've made to dracut.conf are:
omit_dracutmodules+="kernel-modules usrmount"

All required modules are statically compiled into my kernel; /usr is not on a separate partition so I figured I don't need usrmount.

- I've set up Grub 2 (on the one disk of the degraded arrays). I'm using raid=noautodetect since this system (normally) has several other software RAID arrays and I don't want random automatic stuff happening to them.

Results so far:
- I get to see a nice Grub 2 screen from which I can boot my kernel... just like before.
- Kernel boots, dracut starts spamming me
- Dracut times out trying to find the rootfs, which is passed to the kernel in root=UUID=...; dracut complains it cannot find that UUID -- I've tried all combinations of "", "" and "". I suppose the latter should do the trick by itself but dracut's documentation is rather unclear about that.

Dracut never seems to attempt to assemble the RAID-1 arrays. It finally drops into a shell, if I 'cat /proc/mdstat' no arrays have been assembled. I can see all the disks/partitions though, even the symlinks in /dev/disk/by-* are all there. Running "mdadm --examine --scan" lists both the arrays (boot and rootfs) correctly.

I'm probably missing something obvious. I have this running on another system without problems (using as only extra kernel parameters). Any hints or pointers to tutorials? I've been Googling this for a while.

EDIT: problem happens regardless of whether the array is degraded or not. Using "mdadm -A --scan" sets up the arrays correctly (correct names etc. as set through mdadm.conf) and the system can boot fine after exiting from the dracut shell. I've verified dracut has put udev rules in the initramfs to assemble the RAID arrays; they just never get triggered. I've enabled all kinds of debug output from dracut/udev and nothing interesting comes up. It just sits there doing nothing.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum