System couldn't boot from degraded raid 1

Bug #1341312 reported by loa_rus
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Situation: i created software raid 1 configuration. Boot, swap and root were on different partitions. After that i tried to emulate harddrive problem. For this testcase i used virtualbox machine. I removed one of harddrive containers from virtual machine and tried to boot.

What expected: system boots normal.

What happened: First time after deletion system boots normal, but second time it drops into initramfs. I see that md devices exists in system and i can mount them. And array was marked as degraded. When i return disk back system loads normal, but raid is checked as degraded and i need to add partitions to raid again. But if i don't do it system drops to initramfs again. So looks like system loads with degraded raid only if hardware configuration was changed. Here few screenshots.

Screenshot when system stops booting:
https://dl.dropboxusercontent.com/u/25725476/screenshot-2014.07.13-19%3A17%3A20.png

cat /proc/mdstat:
https://dl.dropboxusercontent.com/u/25725476/screenshot-2014.07.13-19%3A18%3A23.png

mdadm -D /dev/md0:
https://dl.dropboxusercontent.com/u/25725476/screenshot-2014.07.13-19%3A19%3A56.png

cat /etc/fstab:
https://dl.dropboxusercontent.com/u/25725476/screenshot-2014.07.13-19%3A22%3A18.png

lsb_release -rd:
https://dl.dropboxusercontent.com/u/25725476/screenshot-2014.07.13-19%3A37%3A09.png

apt-cache policy mdadm:
https://dl.dropboxusercontent.com/u/25725476/screenshot-2014.07.13-19%3A38%3A07.png

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: mdadm (not installed)
ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2
Uname: Linux 3.13.0-29-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Jul 13 19:02:56 2014
InstallationDate: Installed on 2014-06-11 (32 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
SourcePackage: mdadm
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
loa_rus (knight13) wrote :
loa_rus (knight13)
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mdadm (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Krelin (hacker-klever) wrote :

Interestingly enough I could mount root in the (initramfs) shell, maybe it needs more time?

loa_rus (knight13)
description: updated
Revision history for this message
loa_rus (knight13) wrote :

I can't confirm this bug on real hardware. First i tried to check my future configuration on virtualbox machine. But when i recieved real hardware system worked as expected: when i removed one harddrive system works as usual and there no any problems with degraded mark. After I added drive again i manually added partitions to raid and started rebuild. Maybe this bug only affect virtualbox?

Revision history for this message
Michael Krelin (hacker-klever) wrote :

Not in my case. It was real hardware. And I could only boot it after plugging the old drive (even though it wasn't in its best condition and needed to be replaced).

Revision history for this message
Martin Hofbauer (mhansi12) wrote :

See my Bug report + workaround there a few minutes ago:
( need to close it ... )

https://bugs.launchpad.net/ubuntu/+bug/1367666

I definitly can confirm this problem, in a VMware workstation and also with real Hardware.

For the degraded MD device you need to boot a second time !!

As described in my bug report problem can also be replicated easly by installing Ubuntu 14.04 on only 1 disk of a RAID1 device

Workaound:

echo "sleep 2" > /etc/initramfs/scripts/local-premount/delay.sh ; chmod +x delay.sh ; update-initramfs -u

( can also be done from the initramfs prompt by mounting the root device + chroot /root )

tags: added: boot initramfs raid
Revision history for this message
loa_rus (knight13) wrote :

Can't get why system don't boot only on second attemp?

Revision history for this message
Michael Krelin (hacker-klever) wrote :

It didn't boot on the second attempt for me. Neither on the third. I do believe the workaround above would have helped, but I can't afford taking that system offline now…

Revision history for this message
loa_rus (knight13) wrote :

I mean why it boots once, but it does not boot on second attempt. What changed?

Revision history for this message
Michael Krelin (hacker-klever) wrote :

Ah, for me it didn't boot once, but since there's timing involved, it could've involved some random amount of luck.

Revision history for this message
Michael Krelin (hacker-klever) wrote :

And meanwhile I can confirm putting delay into premount helps.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.