local-premount/mdadm script drops to initramfs shell unnecessarily
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
mdadm installed version: 3.2.3-2ubuntu1
I installed Ubuntu 12.04 on a new computer, then added 2 RAID-5 arrays, each having 3 2TB drives. After creating the second array, computer started dropping into initramfs shell after each power-on. A message about degraded array is displayed, but dmesg shows no errors at all. After subsequent reboot everything is fine, /proc/mdstat always shows that both arrays are OK.
Here is the source of the script, found in /usr/share/
#!/bin/sh
if [ "$1" = "prereqs" ] ; then
exit 0
fi
. /scripts/
. /scripts/functions
degraded_arrays || exit 0
mountroot_fail || panic "Dropping to a shell."
Observation: adding 'exit 0' at the top of the script and rebuilding initramfs solved the problem.
I see 2 issues with this script:
1. "Dropping to a shell" message is absolutely not helpful. I spent 2 hours figuring out where it comes from.
2. When there are degraded arrays (apparently because mdadm is not finished assembling them at the time the script is run), it still drops to the shell even when root fs is NOT on the raid array and should not be affected by degraded arrays at all.
Yes, this is a known problem. See: /wiki.ubuntu. com/ReliableRai d /blueprints. launchpad. net/ubuntu/ +spec/foundatio ns-q-software- raid
https:/
https:/
From memory this is a duplicate of an older bug. I will mark this of duplicate, when I find it.