Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260344 - [Patch] sys-kernel/genkernel 3.4.10-r2 needs to do dmraid before mdadm and not call mdstart
Summary: [Patch] sys-kernel/genkernel 3.4.10-r2 needs to do dmraid before mdadm and no...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2009-02-26 07:56 UTC by devsk
Modified: 2012-02-12 07:26 UTC (History)
3 users (show)

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


Attachments
Fix boot from mirrored fakeraid and soft raid on top of dmraid. (genkernel.patch,1.01 KB, patch)
2009-02-26 07:58 UTC, devsk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description devsk 2009-02-26 07:56:37 UTC
The patch does two things:

1. gets rid of mdstart and sets USE_MDADM to make mdadm run instead. mdstart gets mirrored devices all mixed up because of same superblock.

2. call dmraid before mdadm because dmraid devices can be used by MD volumes.
Comment 1 devsk 2009-02-26 07:58:05 UTC
Created attachment 183233 [details, diff]
Fix boot from mirrored fakeraid and soft raid on top of dmraid.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2009-02-27 22:31:54 UTC
Why would anyone ever put mdraid on top of dmraid? :P

Your assignment line is incorrect (the $ isn't needed). Also, setting $USE_MDADM after the code that checks for it has already run doesn't do much good.

Please resubmit your patch after actually testing it.
Comment 3 Chris Gianelloni 2009-02-27 23:49:29 UTC
Using mdadm itself sounds like a good idea.  Any chance that you can split this into two patches, since it is two requests?

The mdadm versus mdstart changes I could see going in right away, for the dmraid/mdraid thing, a *much* better solution would be to use something like baselayout does to specify the order, so the user can do anything they wish, rather than being tied to what is, essentially, a site-local change for your personal configuration.  A generic interface would be *much* better, in the long run.
Comment 4 Chris Gianelloni 2009-02-27 23:50:26 UTC
Also, patches should be made against the Git repository, rather than the released tarballs.  (This one may apply fine, didn't try it...)
Comment 5 devsk 2009-02-28 00:32:01 UTC
that setting $USE_MDADM was dumb and was added later, after I had removed mdstart and tested it with domdadm. I will attach an updated patch.

> Why would anyone ever put mdraid on top of dmraid? :P

To create asymmetric software RAIDs which no hardware card or fakeraid allows. Imagine doing raid10 but using only selected partitions off 4 of your older disks which have 147GB (combined from RAID0 of two raptors), 250GB, 320GB and fifth new 1TB capacity. The seq b/w gains are amazing, for only a small cpu usage increase. It does wonders while indexing large video projects or while restoring a suspended VM.

> Also, setting $USE_MDADM after the code that checks for it has already run doesn't do much
good.

Two different functions...:D I know patch looks confusing.

As for the order, I think doing dmraid first is the right one because its more at the hardware level. Allowing a specific order of these do* thingies generically may be a little involved and for no apparent user requirement as of now.
Comment 6 devsk 2010-02-05 03:47:11 UTC
Did this patch ever make it into genkernel? I have more patches for genkernel which I will upload tonight.

Is someone actively maintaining genkernel?
Comment 7 Fabio Erculiani (RETIRED) gentoo-dev 2010-08-10 06:32:40 UTC
(In reply to comment #5)
> that setting $USE_MDADM was dumb and was added later, after I had removed
> mdstart and tested it with domdadm. I will attach an updated patch.

Please go ahead attaching updated patches. Perhaps atomically split into single requests.

Comment 8 Sebastian Pipping gentoo-dev 2011-01-05 22:45:02 UTC
PS: Adding keyword "Inclusion" to better show this bugs nature in searches...
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-12 07:26:35 UTC
Please update this patch to the latest genkernel and reopen.

I'm also not sure that dropping mdstart is safe, there have been prior reports where mdadm's examine call didn't find stuff properly compared to the kernel start calls.