mdrun fails if large disk present, thus boot fails.

Bug #57972 reported by Niklas Edmundsson
10
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu Dapper on AMD64.

mdrun fails if a large disk is present in the system, causing boot to fail if you have your root partition on MD.

Our setup:
Dual 3ware 9550-SX cards, each with two units which maps to:
sda - single disk (250GB)
sdb - raid5 (1.2TB)
sdc - single disk (250GB)
sdd - raid5 (1.2TB)

The single disks (sda and sdc) are used in an MD mirror for the system.

---8<---
# grep sd /proc/partitions
   8 0 244129792 sda
   8 1 393561 sda1
   8 2 787185 sda2
   8 3 3935925 sda3
   8 4 239007037 sda4
   8 16 1220648960 sdb
   8 17 1220642766 sdb1
   8 32 244129792 sdc
   8 33 393561 sdc1
   8 34 787185 sdc2
   8 35 3935925 sdc3
   8 36 239007037 sdc4
   8 48 1220648960 sdd
   8 49 1220642766 sdd1
---8<---

Perhaps not obvious with a proportional font, but there's only one space between the 2nd and 3rd column on the large devices.

mdadm assumes two spaces. Doing sh -x /sbin/mdrun in the initramfs shows that it generates the following code snippet:
---8<---
if [ ! -b sda4 ]; then mknod sda4 b 8 4; fi ;
   8 16 1220648960 sdb
if [ ! -b sdc ]; then mknod sdc b 8 32; fi ;
---8<---

This causes a syntax error, the entire block fails, meaning no device nodes whatsoever gets created and the system is dead in the water. Note that it's sufficient to have a large device present in the system, so if you have your root device on MD and add a large device to the system you won't be able to boot.

Doing a normal boot, all you see is the following (mostly included as a reference for others bitten by this issue):
---8<---
Begin: Running /scripts/local-top ...
eval: 1: 8: not found
mknod: sdc: File exists
eval: 1: Syntax error: ";" unexpected
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
mdadm: error opening /dev/md?: No such file or directory
Done.
Begin: Waiting for root file system... ...
Done.
ALERT! /dev/md1 does not exist. Dropping to a shell!
---8<---

It would be nice if this was fixed in Dapper. I'll attach a patch that fixes the problem in mdrun.

Revision history for this message
Niklas Edmundsson (niklas-edmundsson) wrote :

Patch that fixes /proc/partinfo parsing in mdrun so system with large devices present can boot when having root on MD.

Revision history for this message
Niklas Edmundsson (niklas-edmundsson) wrote :

Ehm.
That would be /proc/partitions and nothing else.

Revision history for this message
Edmund Rhudy (edmundrhudy) wrote :

This is a duplicate of #53510, which itself is a duplicate of #25093. I encountered the same bug today myself, and it is slightly irksome that no official fix yet exists for 6.06. Perhaps it can be incorporated into a future service release for LTS (6.06.2)?

Revision history for this message
Jason Harley (jharley) wrote :

I've run into this problem now as well, and consider it fairly serious. Not having my multi-terabyte RAID array attached to my shiny new Ubuntu NAS-head is a major blocker on my Ubuntu deployment.

Any chance that we're going to see this patch included in an update sometime very soon?

Revision history for this message
Christian Brandt (brandtc) wrote :

I can confirm that the bug is still around and that the patch is working. It would be very nice if someone could include the patch in Dapper because very soon such big drives will be mainstream and systems will stop booting in a ugly way.

Changed in mdadm:
status: New → Confirmed
Revision history for this message
ceg (ceg) wrote :

Is this still an issue with recent releases? mdrun isn't around anymore

Changed in mdadm (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Niklas Edmundsson (niklas-edmundsson) wrote : Re: [Bug 57972] Re: mdrun fails if large disk present, thus boot fails.

On Sun, 28 Mar 2010, ceg wrote:

> Is this still an issue with recent releases? mdrun isn't around anymore

Haven't verified, but I suspect it is.

/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | <email address hidden>
---------------------------------------------------------------------------
  Experience is the name everyone gives to his mistakes
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Revision history for this message
Alan Tam (at) wrote :

Today I replaces the hard drive of the RAID-1 containing root file system on a dapper system to a 2TB drive, and then it failed to boot. So I think it is still a very valid bug to dapper.

Revision history for this message
Alan Tam (at) wrote :

Even the patch attached doesn't completely fix the problem. My /proc/partitions is like this. Note the single space between the 2nd and 3rd column. Need to change those "\ \+\ " to "\ \+" in both CREATECMD= and PARTLIST= statements.

root@delta:~# cat /proc/partitions
major minor #blocks name

   8 0 1953514584 sda
   8 1 4000153 sda1
   8 2 1 sda2
   8 5 987966 sda5
   8 6 1948523818 sda6
   8 16 1953514584 sdb
   8 17 1953512001 sdb1
   9 0 979840 md0
   9 1 483403776 md1
 253 0 4194304 dm-0
 253 1 67108864 dm-1
 253 2 100663296 dm-2
 253 3 67108864 dm-3
 253 4 134217728 dm-4
 253 5 16777216 dm-5

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.