[Bug 645575] Re: udev rules for mdadm cause boot hangs and md array malfunctions
sungaMagnus
645575 at bugs.launchpad.net
Wed Jun 20 10:10:09 UTC 2012
Instead of applying Adalberto's patch
I found this http://ubuntuforums.org/showthread.php?p=11388915 and it works for me
tl;dr there is a race condition between assemble of the raid array and the check on the health of the array.
In file, /usr/share/initramfs-tools/scripts/mdadm-functions
Modify function from:
degraded_arrays()
{
mdadm --misc --scan --detail --test >/dev/null 2>&1
return $((! $?))
}
To:
degraded_arrays()
{
udevadm settle
mdadm --misc --scan --detail --test >/dev/null 2>&1
return $((! $?))
}
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to udev in Ubuntu.
https://bugs.launchpad.net/bugs/645575
Title:
udev rules for mdadm cause boot hangs and md array malfunctions
Status in “udev” package in Ubuntu:
Confirmed
Bug description:
Binary package hint: udev
Hi,
las week I upgraded ubuntu 9.10 to 10.04, and then installed 2 new hard drives and built a new md0 RAID1 array by means of mdadm, defining also a new mdadm.conf with just one line for md0, and a new entry in fstab for the mount point of md0.
Upon reboot, the boot process stopped saying it couldn't find the device for this new mount point; /proc/mdstat listed this new strange "md_d0" array, inactive, with one of the two drives which were part of my md0.
On further reboots, I noticed the drive "captured" this way by "md_d0" was randomly picked up between the two drives of md0.
This thread here: http://osdir.com/ml/linux-raid/2009-08/msg00219.html directed my to the solution.
So here's the content of my 85-mdadm.rules file, edited in order not to run mdadm --incremental for each and every array member found!!
cat /lib/udev/rules.d/85-mdadm.rules
# This file causes block devices with Linux RAID (mdadm) signatures to
# automatically cause mdadm to be run.
# See udev(8) for syntax
SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="linux_raid*", \
RUN+="/sbin/mdadm --assemble --scan"
#RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
#AMC100922: caused malfunctions on preconfigured arrays!!
This way it works just fine.
Don't know if this error could be related to the upgrade from 9.10 to 10.04, as I didn't have any md array on 9.10, and only defined it after the upgrade to 10.04.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/645575/+subscriptions
More information about the foundations-bugs
mailing list