FS#23905 - [mdadm] udev based mkinitcpio install hook

Attached to Project: Arch Linux
Opened by Dave Reisner (falconindy) - Saturday, 23 April 2011, 20:01 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 06 July 2011, 07:09 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The attached hook is a simplification of the current mdadm hookset, using the upstream udev rule to assemble RAID devices, rather than via /etc/mdadm.conf or by manual specification on the kernel cmdline. Since I realize that not one size fits all, I've named the hook mdadm_udev. I also suggest removing the udev rule from the current mdadm install hook, as its useless without the /sbin/mdadm binary. Including /sbin/mdadm in the current hook will actually cause /sbin/mdassemble will stop the already-assembled devices and reassemble them. So, I think it makes more sense to separate the two. Most users should find that the new hook is sufficient.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Wednesday, 06 July 2011, 07:09 GMT
Reason for closing:  Fixed
Comment by Dave Reisner (falconindy) - Sunday, 24 April 2011, 01:18 GMT
Scrap removing the udev rule from the current hook... forgot that its necessary for creating the by-uuid/by-label symlinks.
Comment by Peter Hardman (shetland_breeder) - Tuesday, 31 May 2011, 20:23 GMT
The problem with leaving the udev rule in the mdadm hook is that starting from udev 171 the user gets an error message on the screen from udev every time it tries to execute /sbin/mdadm. For me this means I get a couple of screen-fulls of error messages at boot (I have 8 raid1 arrays) - not what I like to see ;).

Leaving the udev rule out causes no problems (for me at lest) so long as the root device is specified as /dev/mdx in GRUB. Doesn't GRUB install using device nodes on a fresh installation? In which case leaving out the udev rule should be the default.

Conversely the proposed mdadm_udev hook _requires_ that the root device is specified by-label or by-uuid in GRUB since the device nodes may change from boot to boot.

Comment by Dave Reisner (falconindy) - Sunday, 12 June 2011, 00:57 GMT
@Peter: I don't see a downside to your "requirement". The next release of mkinitcpio will make this really simple, and allow syntax such as:

root=LABEL=rootdevice
root=UUID=3ad81e19-54fc-498a-9775-4effc9cc11c8

Is there a case where you wouldn't want this kind of identification?

Loading...