mdrun fails if large disk present, thus boot fails.
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.
Patch that fixes /proc/partinfo parsing in mdrun so system with large devices present can boot when having root on MD.