Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] RAID-1 on secondary disks how?
Date: Tue, 29 Jan 2019 17:59:15
Message-Id: CAGfcS_nqeCjuVHyp7kRdsFk8kC+6DS9rSENt0i1Xq8m9fAPxhw@mail.gmail.com
In Reply to: Re: [gentoo-user] RAID-1 on secondary disks how? by Alan Mackenzie
1 On Tue, Jan 29, 2019 at 11:48 AM Alan Mackenzie <acm@×××.de> wrote:
2 >
3 > On Tue, Jan 29, 2019 at 09:32:19 -0700, Grant Taylor wrote:
4 > > On 01/29/2019 09:08 AM, Peter Humphrey wrote:
5 > > > I'd rather not have to create an initramfs if I can avoid it. Would it
6 > > > be sensible to start the raid volume by putting an mdadm --assemble
7 > > > command into, say, /etc/local.d/raid.start? The machine doesn't boot
8 > > > from /dev/md0.
9 >
10 >
11 > For this, the kernel needs to be able to assemble the drives into the
12 > raid at booting up time, and for that you need version 0.90 metadata.
13 > (Or, at least, you did back in 2017.)
14 >
15
16 Can't say I've tried it recently, but I'd be shocked if it changed
17 much. The linux kernel guys generally consider this somewhat
18 deprecated behavior, and prefer that users use an initramfs for this
19 sort of thing. It is exactly the sort of problem an initramfs was
20 created to fix.
21
22 Honestly, I'd just bite the bullet and use dracut if you want your OS
23 on RAID/etc. It is basically a one-liner at this point to install and
24 a relatively small tweak to your GRUB config (automatic if using
25 mkconfig). Dracut will respect your mdadm.conf, and just about all
26 your other config info in /etc. The only gotcha is rebuilding your
27 initramfs if it drastically changes (but, drastically changing your
28 root filesystem is something that requires care anyway).
29
30 But, if you're not using an initramfs you can get the kernel to handle
31 this. Just don't be surprised when it changes your device name or
32 whatever.
33
34 --
35 Rich

Replies

Subject Author
Re: [gentoo-user] RAID-1 on secondary disks how? Alan Mackenzie <acm@×××.de>
Re: [gentoo-user] RAID-1 on secondary disks how? Grant Taylor <gtaylor@×××××××××××××××××××××.net>