[Bug 1029822] Re: local-premount/mdadm script drops to initramfs shell unnecessarily

Dmitrijs Ledkovs launchpad at surgut.co.uk
Fri Jul 27 08:41:10 UTC 2012


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

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1029822

Title:
  local-premount/mdadm script drops to initramfs shell unnecessarily

Status in “mdadm” package in Ubuntu:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1029822/+subscriptions




More information about the foundations-bugs mailing list