On 29/01/2019 16:48, Alan Mackenzie wrote:
Hello, All.

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.

Drive by comment.

I thought there was a kernel option / command line parameter that
enabled the kernel to automatically assemble arrays as it's
initializing.  Would something like that work for you?

I have no idea where that is in the context of what you're working on.

I use mdadm with a RAID-1 pair of SSDs, without an initramfs (YUCK!).
My root partition is on the RAID.

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.)

You still do. 0.9 is deprecated and bit-rotting. If it breaks, nobody is going to fix it!!!

My command for building my array was:

     # mdadm --create /dev/md2 --level=1 --raid-devices=2 \
     --metadata=0.90 /dev/nvme0n1p2 /dev/nvme1n1p2.

However, there's another quirk which bit me: something in the Gentoo
installation disk took it upon itself to renumber my /dev/md2 to
/dev/md127.  I raised bug #539162 for this, but it was decided not to
fix it.  (This was back in February 2015.)

This is nothing to do with gentoo - it's mdadm. And like with sdX for drives, it's explicitly not guaranteed that the number remains consistent. You're supposed to use names now, eg /dev/md/root, or /dev/md/home for example.

Cheers,
Wol

Reply via email to