[Bug 1334699] Re: mountroot_fail returns success when it has not changed the root found situation

vak 1334699 at bugs.launchpad.net
Sun Jun 29 19:10:40 UTC 2014


and maybe it is exactly my case?..
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1335642

-- 
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/1334699

Title:
  mountroot_fail returns success when it has not changed the root found
  situation

Status in “mdadm” package in Ubuntu:
  New

Bug description:
  
  When booting and the root filesystem is not found, initramfs runs any mountroot_fail hook scripts which have been registered. The mdadm mountroot_fail script tries to assemble arrays and if "mdadm  --incremental --run --scan" or "mdadm --assemble --scan --run" return successfully it returns with a 0 return value. This will cause the top level caller to exit any other failure hooks and try to mount root again. 

  This seems good, but the mdadm executions will also return
  successfully if they made no change to the situation. In my particular
  problem, the kernel did not have access to the modules needed to see
  my hard drives. Thus mdadm could not assemble them into the root
  device. However, since the mountroot_fail function returned success
  (since mdadm had no failures in assembling no devices) the initramfs
  continued to loop forever trying to find root, running mountroot_fail
  in mdadm-functions, repeat. It would never drop to am emergency shell
  so I could examine the situation.

  I did not discover my module issue until I added a check in the
  mountroot_fail to see if the script had been run more than once. Below
  is my code which I added before each "return 0" in the original
  script, but it is not suitable as a real solution.

  if [ -f /tmp/mdadm_loop ] ; then
    return 1
  fi
  touch /tmp/mdadm_loop
  return 0

  
  Below is required info based on reporting instructions.

  # lsb_release -rd
  Description:    Ubuntu 14.04 LTS
  Release:        14.04

  # apt-cache policy mdadm
  mdadm:
    Installed: 3.2.5-5ubuntu4.1
    Candidate: 3.2.5-5ubuntu4.1
    Version table:
   *** 3.2.5-5ubuntu4.1 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       3.2.5-5ubuntu4 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

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



More information about the foundations-bugs mailing list