Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143767 - RC_VOLUMES are started before modules are loaded
Summary: RC_VOLUMES are started before modules are loaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 143779 (view as bug list)
Depends on: 144017
Blocks:
  Show dependency tree
 
Reported: 2006-08-13 04:37 UTC by Erik Logtenberg
Modified: 2006-12-12 07:16 UTC (History)
2 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 Erik Logtenberg 2006-08-13 04:37:23 UTC
I notice Gentoo starts the Logical Volume Manager before it autoloads modules. 
.
For me this is a bit of a problem, because my LVM volumes are on a SATA RAID array for which a module has to be loaded. I configured this module to be autoloaded by putting it in /etc/modules.autoload.d/kernel-2.6, so that /etd/init.d/modules loads them during boot. This works fine by itself, but unfortunately LVM is initialized before loading the modules (by /sbin/rc I think), so it doesn't find my volumes. Shortly thereafter Gentoo tries to mount all local filesystems, and thad fails ofcouse, since the LVM volume can't be found.

Even if loading LVM as early as possible in the bootprocess (even before modules are autoloaded) is considered a must-have feature, then still at least there should be a second scan for new volumes right after the modules are loaded.
Comment 1 SpanKY gentoo-dev 2006-08-13 07:51:33 UTC
*** Bug 143779 has been marked as a duplicate of this bug. ***
Comment 2 SpanKY gentoo-dev 2006-08-13 07:52:38 UTC
one fix i think would be to have the lvm addon try and modprobe any modules it needs if lvm support is not detected ...
Comment 3 Cristi 2006-08-13 10:58:12 UTC
(In reply to comment #2)
> one fix i think would be to have the lvm addon try and modprobe any modules it
> needs if lvm support is not detected ...
> 

Looks to me like too much a hack, adding in the lvm addon, functionality done by the 'modules' service...I don't know also how the addon will know exactly what module to load for that specific SATA disk array.
Ah, btw, for me the raid addon has the same problem - it needs to load modules from modules.autoload/* first ...

Baselayout has several other problems - see http://forums.gentoo.org/viewtopic-t-488850.html. Fixing them looks to me like the first step into solving this one too. 

Since that can take some time, maybe before running these addons, run the 'modules' service and get it out of RC_CRITICAL_SERVICES if it is there (not necessary, but nice to do)

Q: Is there a specific need for something else be run before service 'modules'? Can't it be the first service loaded?

Note also that, depending on user's hardware and software configuration, you should run these addons (raid,lvm) at least 2 times.
Comment 4 SpanKY gentoo-dev 2006-08-13 23:37:33 UTC
for some people, they need the volumes loaded before anything else ... others need some services (like modules) loaded before the volumes

as for running twice, you can already do that ... change RC_VOLUME_ORDER in your conf.d/rc file

modules may need to start programs so it needs checkroot to be run already
Comment 5 Erik Logtenberg 2006-08-14 01:57:04 UTC
After reading your comments and browsing through some Forum topics, I understand that there are some different opinions about how the boot process should be arranged. I conclude that it might take a little time before this specific issue is addressed, so I'd like to make a little workaround for the time being.

Unfortunately it's not as easy as adding a "before" declaration to the /etc/init.d/modules script, since the RC_VOLUMES aren't started from a init.d script.

Can I ask if you have any suggestions as to how I could best implement a temporary workaround?
Comment 6 Cristi 2006-08-14 16:18:54 UTC
If you can please provide some links to the forums discussing various boot process arrangements, that would help me - maybe I can even come up w/ a suggestion for a quick fix for the current problem - tx! (feel free to use direct email if that wouldn't be appropriate to post on bugzilla)

Having some examples of scripts/modules/whatever that would need 'modules' service run *after* some of the raid/lvm/dm addons are started would be great too.

Comment 7 Erik Logtenberg 2006-09-24 08:35:13 UTC
Since https://bugs.gentoo.org/show_bug.cgi?id=144017 is now fixed, is it now possible to have modules load before RC_VOLUMES are started? In sys-apps/baselayout-1.12.5 this is still in the wrong order.
Comment 8 Roy Marples (RETIRED) gentoo-dev 2006-12-12 03:34:14 UTC
volumes are now started/stopped by the volumes init script.

Through use of RC_NEED, RC_USE, RC_AFTER, RC_BEFORE in /etc/conf.d/foo you can control at what point it's run

So in /etc/conf.d/modules you put RC_NEED="volumes" to get volumes to run before modules are loaded.
Or you would put RC_NEED="modules" in /etc/conf.d/volumes to get module to run before volumes.
Comment 9 Erik Logtenberg 2006-12-12 07:14:22 UTC
Ah, that's good news. I can't find this in the Changelog (yet?), in which version of baselayout is this implemented?
Comment 10 Roy Marples (RETIRED) gentoo-dev 2006-12-12 07:16:53 UTC
Sorry

baselayout-1.13.0_alpha9