MD_AUTODETECT=y kernel option is obsolete (boot delay and udev/mdadm (raid) disturbance)

Bug #551719 reported by ceg
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
mdadm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu still uses the kernel option
CONFIG_MD_AUTODETECT=y
thus enables the kernel's RAID autodetection during boot.

However, aside from causing a delay for everyone, this often also disturbs the udev/mdadm setup when raid devices are present in the system.
(i.e. devices are partly busy/set up by the kernel, without an entry in the mapfile used by mdadm --incremental)

Here is what README.initrams from mdadm tarball says about the kernel's raid autodetection features:

"while useful, [they] do not provide complete functionality
and are unlikely to be extended. The preferred way to assemble md
arrays at boot time is using 'mdadm' "

Ubuntu does assemble arrays using udev rules that run mdadm. (In initramfs as well as later on.)

The kernel's raid autodetection can and should therefore be disabled in ubuntu kernels.

ceg (ceg)
description: updated
ceg (ceg)
summary: - enabled kernel raid autodetection disturbs initramfs
+ enabled kernel raid autodetection disturbs udev/mdadm (initramfs &
+ later)
tags: added: kernel-series-unknown
Revision history for this message
ceg (ceg) wrote : Re: enabled kernel raid autodetection disturbs udev/mdadm (initramfs & later)

To disable raid assembly by the kernel (before it is disabled in the kernel config) add the boot option "raid=noautodetect".

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi ceg,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ . If the issue remains, please run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 551719

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
ceg (ceg) wrote :

I don't see any change in the CONFIG_MD_AUTODETECT setting.

Changed in linux (Ubuntu):
status: Incomplete → New
status: New → Confirmed
Revision history for this message
ceg (ceg) wrote :

This is simpy an unneeded and adverse option enabled in the default kernel configuration. Not much to to with upstream.

tags: added: kernel-config
removed: kernel-series-unknown kj-triage needs-kernel-logs needs-upstream-testing
ceg (ceg)
description: updated
ceg (ceg)
summary: - enabled kernel raid autodetection disturbs udev/mdadm (initramfs &
- later)
+ boot delay and udev/mdadm disturbance (obsolete kernel raid
+ autodetection)
Revision history for this message
ceg (ceg) wrote : Re: boot delay and udev/mdadm disturbance (obsolete kernel raid autodetection)

Please nominate this quick correction of the kernel config for natty.

Revision history for this message
donarntz (donarntz) wrote :

This is a pretty big pain, as all my music files are on a raid10.

ceg (ceg)
Changed in mdadm (Ubuntu):
status: New → Confirmed
ceg (ceg)
summary: - boot delay and udev/mdadm disturbance (obsolete kernel raid
- autodetection)
+ boot delay and udev/mdadm (raid) disturbance (obsolete MD_AUTODETECT=y)
Revision history for this message
ceg (ceg) wrote : Re: boot delay and udev/mdadm (raid) disturbance (obsolete MD_AUTODETECT=y)

This can not be a duplicate of bug #942106. This is about an obsolete kernel option for very old style kernel raid assembly. It slows mdadm assembly down and can grab devices.

In case a patch to another bug fixes this bug too, please mark the patch as closing multiple bugs.

summary: - boot delay and udev/mdadm (raid) disturbance (obsolete MD_AUTODETECT=y)
+ MD_AUTODETECT=y is obsolete (boot delay and udev/mdadm (raid)
+ disturbance)
summary: - MD_AUTODETECT=y is obsolete (boot delay and udev/mdadm (raid)
- disturbance)
+ MD_AUTODETECT=y kernel option is obsolete (boot delay and udev/mdadm
+ (raid) disturbance)
Revision history for this message
Jean-Philippe Guérard (fevrier) wrote :

The problem this bug report is about is "boot delay and udev/mdadm (raid) disturbance". As such, it is a duplicate of #942106.

Then the bug report offers an explanation and a solution.

The MD autodetection only occurs when md drivers are statically compiled (see https://www.kernel.org/doc/Documentation/md.txt). The Ubuntu MD drivers are compiled as mdules, so will not be automatically detected.

Revision history for this message
ceg (ceg) wrote :

Same symptoms do not mean the same cause (bug).

Many thanks for hinting to the module restriction. This bug can be closed then. :)

Changed in mdadm (Ubuntu):
status: Confirmed → Invalid
Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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