Hello, Rich. On Tue, Jan 29, 2019 at 12:58:38 -0500, Rich Freeman wrote: > On Tue, Jan 29, 2019 at 11:48 AM Alan Mackenzie <[email protected]> wrote:
> > On Tue, Jan 29, 2019 at 09:32:19 -0700, Grant Taylor wrote: > > > On 01/29/2019 09:08 AM, Peter Humphrey wrote: > > > > I'd rather not have to create an initramfs if I can avoid it. Would it > > > > be sensible to start the raid volume by putting an mdadm --assemble > > > > command into, say, /etc/local.d/raid.start? The machine doesn't boot > > > > from /dev/md0. > > For this, the kernel needs to be able to assemble the drives into the > > raid at booting up time, and for that you need version 0.90 metadata. > > (Or, at least, you did back in 2017.) > Can't say I've tried it recently, but I'd be shocked if it changed > much. The linux kernel guys generally consider this somewhat > deprecated behavior, and prefer that users use an initramfs for this > sort of thing. It is exactly the sort of problem an initramfs was > created to fix. An initramfs is conceptually so ugly that I view it as a workaround, not a fix, to whatever problem it's applied to. It would surely be a bug if the kernel were capable of manipulating RAIDs, but not of initialising and mounting them. > Honestly, I'd just bite the bullet and use dracut if you want your OS > on RAID/etc. It is basically a one-liner at this point to install and > a relatively small tweak to your GRUB config (automatic if using > mkconfig). Dracut will respect your mdadm.conf, and just about all > your other config info in /etc. The only gotcha is rebuilding your > initramfs if it drastically changes (but, drastically changing your > root filesystem is something that requires care anyway). Well, at the moment my system's not broken, hence doesn't need fixing. Last time I looked at Dracut, it would only work in a kernel built with modules enabled, ruling out my setup. Also, without putting in a LOT of time and study, dracut is a massive, opaque mystery. I've got a pretty good mental picture of how my system works, and introducing an initramfs would degrade that picture enormously. That means if any problems happened with the initramfs, I'd be faced with many days study to get to grips with it. > But, if you're not using an initramfs you can get the kernel to handle > this. Just don't be surprised when it changes your device name or > whatever. The kernel seems to leave it alone. Any Gentoo installation CD I've used has corrupted the setup, changing all the names to /dev/md127, /dev/md126, ...., leaving the victim PC unbootable. Hence my root partition is /dev/md127, despite me originally creating it as something like /dev/md4. > -- > Rich -- Alan Mackenzie (Nuremberg, Germany).

