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

Artem Khodyush greenkaa at gmail.com
Fri Jul 27 08:26:08 UTC 2012


Public bug reported:

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.

** Affects: mdadm (Ubuntu)
     Importance: Undecided
         Status: New

-- 
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:
  New

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