initramfs' init-premount degrades *all* arrays (not just those required to boot)

Bug #497186 reported by ceg
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Confirmed
Undecided
Unassigned
Declined for Lucid by Dimitri John Ledkov

Bug Description

After a timeout mdadm in initrams degrades all arrays instead of just those required for the rootfs.

This is not good since non-rootfs arrays are likely to be available only incompletely (due to the early stage during boot) and are getting desynced by this.

When creating the initramfs image the mdadm hook should determine the dependencies of the rootfilesystem and save a list of the required md devices in the initramfs.

See: How would you decide what device is needed? at https://wiki.ubuntu.com/ReliableRaid

Currently the initramfs boot script just looks for *any* available incomplete array and calls "mdadm --assemble --scan --run", which will start *all* runnable arrays.

---
comment #2 contains a workaround for the proper command to run single arrays degraded.

ceg (ceg)
summary: - mdadm degrades all arrays (from initramfs) instead of just those
- required to boot
+ initramfs' mdadm degrades all arrays (not just those required to boot)
Revision history for this message
ceg (ceg) wrote : Re: initramfs' mdadm degrades all arrays (not just those required to boot)

On https://wiki.ubuntu.com/ReliableRaid See: How would you decide what device is needed?

Only raids required for the rootfs should be started degraded if they haven't come up for a while.

(Within the ubuntu hotplug-scheme /usr/share/initramfs-tools/hooks/cryptroot contains code that may be usefull to determine devices that the fstab depends on.)

ceg (ceg)
description: updated
ceg (ceg)
summary: - initramfs' mdadm degrades all arrays (not just those required to boot)
+ initramfs' init-premount degrades *all* arrays (not just those required
+ to boot)
Revision history for this message
ceg (ceg) wrote :

As long as the proper mdadm --incremental mode command (to start a single array) is not available (Bug #251646) a workaround needs to be used:

mdadm --remove <incomplete-md-device> <arbitrary-member-device-of-incomplete-array>

mdadm --incremental --run <arbitrary-member-device-of-incomplete-array>

description: updated
ceg (ceg)
Changed in mdadm (Ubuntu):
status: New → Confirmed
ceg (ceg)
description: updated
Revision history for this message
ceg (ceg) wrote :

Note that with the UUID-based raid assembly
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/158918/comments/33
the mdadm.conf file is not used to store ARRAY definitions any more.

Thus the (UUID) list of raid devices required to mount the rootfs must be stored in a separate file within initramfs.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

@ceg-

I read through https://wiki.ubuntu.com/ReliableRaid, and it looks pretty good. Are you willing to implement this for Maverick?

Revision history for this message
ceg (ceg) wrote :

Hi Dustin, I am not a developer and don't know how to create packages etc. Though, I have gathered information from using mdadm and bugreports to make it easier for a developer to bring ubuntu's mdadm setup in shape.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.