[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#605824: initramfs-tools: mkinitramfs fails to derrive root block device on partitioned MD RAID (/dev/md1p3 -> /sys/block/md1/md1p3)



Thanks Maximilian, patch seems to work fine for this setup.

There was minor problem at first run, though, but I believe this was due to forgotten RAID superblock on one drive, which was later partitioned and its partitions becomes parts of other arrays. As mkinitramfs seems to call mdadm --scan to get list of available arrays, this forgotten superblock also appeared in the scan list as an array, which then interferred with real arrays somehow and led to unbootable system.
So I reverted everything back, zeroed that forgotten superblock, reassembled current arrays, tested mkinitramfs and executed update-initramfs -u, this time with no problems at all.

There are different common naming schemes for partitioned MD RAIDs, e.g. (md_d0: md_d0p1, md_d0p2, ...) instead of (md0: md0p1, md0p2, ...), which I choosed, but I believe your patch, which strips "p[0-9]" out of partition device name should work for these schemes too.

Thanks again. Regards,

Cestmir


On Sun, Dec 5, 2010 at 10:17 AM, maximilian attems <max@stro.at> wrote:
On Sat, 04 Dec 2010, Cestmir Hybl wrote:

> attaching output of:
>   tree /sys/block
>   tree /sys/devices/virtual/block/md1
>
> ch.
>

could you please test the following patch, on a running system it applies
to /usr/share/initramfs-tools/hook-functions:


 cd /usr/share/initramfs-tools/
 sudo patch -p1 </tmp/0001-MODULES-dep-Fix-partitioned-raid-setup.patch
patching file hook-functions
Hunk #1 succeeded at 297 (offset -2 lines).


thank you.

--
maks


Reply to: