[arch-general] mkinitcpio: mdadm_udev Hook

Simon Perry arch at sanxion.net
Wed Oct 3 08:41:05 EDT 2012


Hi,

I've just been re-installing a box, and saw that the wiki says regarding
using the mdadm_udev hook:

> "This is the preferred method of mdadm assembly (rather than using the
> above mdadm hook). "

I've tried to use the mdadm_udev hook, but the devices get named:

> normal md0 (/boot)                                      is md127
> normal md1 (encrypted, then lvm with swap and / on it ) is md126

I found this out with "cat /proc/partitions" once my box failed to boot
and dropped to the initramfs shell.

Seems pretty random, the first actual device isn't even the lowest
number.

There doesn't seem to be any documented way to have my raid1 devices
named so I can use:

> cryptdevice=/dev/md1:crypt

in my kernel arg line.

The only way to get things to work is to use the mdadm hook and have my
devices specified in /etc/mdadm.conf

Can I rely on md127 and md126 being the same across every boot, and
therefore resign myself to using this numbering (instead of the much
nicer md0 and md1), and use it in my cryptdevice kernel arg and be done
with it?

Given this thread: https://bbs.archlinux.org/viewtopic.php?id=149358

And the comment:

"I have little interest in supporting the mdadm hook. Assembly via udev
is the preferred method here."

What is the right way to do this?

Cheers.

-- 
Simon Perry (aka Pezz)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20121003/ad9a0401/attachment.asc>


More information about the arch-general mailing list