Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301617 - sys-fs/mdadm: mdraid rc-script should be started before dmcrypt
Summary: sys-fs/mdadm: mdraid rc-script should be started before dmcrypt
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-20 13:03 UTC by Torsten Kurbad
Modified: 2015-04-04 21:57 UTC (History)
1 user (show)

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


Attachments
Patch for sys-fs/mdadm/files/mdraid.rc (mdraid.rc.diff,392 bytes, patch)
2010-01-20 13:04 UTC, Torsten Kurbad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kurbad 2010-01-20 13:03:36 UTC
With mdadm one is advised to no longer rely on kernel level autodetection of raid arrays, but to use mdadm --assemble instead. To accomplish this task, sys-fs/mdadm installs /etc/init.d/mdraid.

This script needs some adjustment, if you want to be able to properly use a raid array on bootup that has been encrypted using dmcrypt. In fact, it is vital that mdraid is being started before dmcrypt.

Find attached a patch to /usr/portage/sys-fs/mdadm/mdraid.rc that does just that and works for me.

Regards,
Torsten
Comment 1 Torsten Kurbad 2010-01-20 13:04:25 UTC
Created attachment 216967 [details, diff]
Patch for sys-fs/mdadm/files/mdraid.rc
Comment 2 SpanKY gentoo-dev 2010-06-03 01:16:02 UTC
some people do raid-on-dmcrypt while others do dmcrypt-on-raid.  there is no way to satisfy everyone.  if you need dmcrypt before raid, then set the dependency in your own conf.d file.  use rc_need as documented in `man 8 runscript`.
Comment 3 Torsten Kurbad 2010-06-03 10:30:25 UTC
(In reply to comment #2)
> use rc_need as documented in `man 8 runscript`.

I wasn't aware of that option, or at least I got the wrong idea on how to use it. Works like a charme now, thank you!
Comment 4 SpanKY gentoo-dev 2010-06-03 17:26:52 UTC
ive added a tip to the conf.d file about rc_need