Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520202 - sys-boot/grub - grub fails to automatically assemble second mdraid10 in time for the kernel to find root?
Summary: sys-boot/grub - grub fails to automatically assemble second mdraid10 in time ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-18 17:57 UTC by Harris Landgarten
Modified: 2017-09-01 20:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2014-08-18 17:57:28 UTC
I have been trying to move my root partition from a degraded raid 10 on an Intel sata controller to a new root on a marvell sata controller.

The old root is /dev/md1 and the new root is /dev/md2

Both are degraded raid 10s

When I try to boot with root=/dev/md2 the root is not recognized and fails with
unknown block 9,2 which is /dev/md2.

I can boot with no problem changing to root=/dev/md1 in grub.cfg

all the drivers are built into the kernel.

It seems that grub is not waiting for md2 to be assembled before accessing it.

Both arrays are metadata=0.9
Comment 1 Mike Gilbert gentoo-dev 2014-09-08 02:07:55 UTC
This is not a grub problem.

unknown block 9,2 is a message from your kernel.
Comment 2 Harris Landgarten 2014-09-08 03:38:45 UTC
grub is supposed to assemble the array and does not. Then the kernel cannot find the root. I worked around the issue with an initramfs but grub does seem to have an issue with marvell sata controllers when using the built in mdraid drivers.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-08 09:06:50 UTC
1) Please post your `emerge --info' output in a comment.
2) Please review the Summary and see if you agree with that wording.
Comment 4 Mike Gilbert gentoo-dev 2014-09-09 19:37:36 UTC
grub is NOT supposed to assemble the array. Your kernel and/or initramfs does that.

grub only implements read-only access for mdraid.
Comment 5 Harris Landgarten 2014-09-09 20:20:13 UTC
then why does grub have its own mdraid modules?

Unfortunately I cannot test at the moment.

Let me explain what I did and why I think it is a bug.

I had be running with 2 1T disks in raid1 with root as sd{a,b}3 in md1 with lvm on top of md3 which were the extended partitions

I was running out of root space after having to move /usr and /var off lvm because of udev and systemd

so I decided to add move disks and use mdraid-10.

I first moved the lvm stuff creating sdc5 missing sdd5 missing mdraid-10

that worked fine so I added in sda5 and sdb5

I wanted to be more careful with the root and make sure the new array would boot.

so I made a sdc3 missing sdd3 missing mdraid-10 and copied the root to it.

at this point I had sda3 sdb3 as md1 with root and sdc3 sdd3 as md2 with new root.

md1 had disks on an intel sata controller and md2 disks were on a marvell sata
controller

At this point I could boot with root=/dev/md1 but any time I tried to boot with
root=/dev/md2 I got (9,2) not found. btw 9,2 is /dev/md2. the grub.cfg was the same exactly the same except for root=. I even booted off the same boot partition which was on the marvell controller.

That is why I filed the bug.
Comment 6 Mike Gilbert gentoo-dev 2014-09-10 02:01:47 UTC
(In reply to Harris Landgarten from comment #5)
> then why does grub have its own mdraid modules?
>

grub's mdraid code is used to load your kernel and initramfs into memory, if those happen to be stored on an mdraid volume.

grub's mdraid code not used for anything once the kernel has been started. The kernel and initramfs have their own code for probing and assembling mdraid devices.