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

Bug #551719 reported by ceg on 2010-03-30
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
mdadm (Ubuntu)
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) on 2010-03-30
description: updated
ceg (ceg) on 2010-03-30
summary: - enabled kernel raid autodetection disturbs initramfs
+ enabled kernel raid autodetection disturbs udev/mdadm (initramfs &
+ later)
tags: added: kernel-series-unknown

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

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
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
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) on 2010-05-17
description: updated
ceg (ceg) on 2010-05-30
summary: - enabled kernel raid autodetection disturbs udev/mdadm (initramfs &
- later)
+ boot delay and udev/mdadm disturbance (obsolete kernel raid
+ autodetection)

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

donarntz (donarntz) wrote :

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

ceg (ceg) on 2011-04-15
Changed in mdadm (Ubuntu):
status: New → Confirmed
ceg (ceg) on 2011-04-15
summary: - boot delay and udev/mdadm disturbance (obsolete kernel raid
- autodetection)
+ 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)

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.

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  Edit
Everyone can see this information.

Other bug subscribers