local-premount/mdadm script drops to initramfs shell unnecessarily

Bug #1029822 reported by Artem Khodyush
8
This bug affects 1 person
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/initramfs-tools/scripts/local-premount/mdadm
#!/bin/sh

if [ "$1" = "prereqs" ] ; then
  exit 0
fi

. /scripts/mdadm-functions
. /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.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Yes, this is a known problem. See:
https://wiki.ubuntu.com/ReliableRaid
https://blueprints.launchpad.net/ubuntu/+spec/foundations-q-software-raid

From memory this is a duplicate of an older bug. I will mark this of duplicate, when I find it.

Changed in mdadm (Ubuntu):
status: New → Confirmed
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.