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.
*** Bug 143779 has been marked as a duplicate of this bug. ***
one fix i think would be to have the lvm addon try and modprobe any modules it needs if lvm support is not detected ...
(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.
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
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?
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.
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.
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.
Ah, that's good news. I can't find this in the Changelog (yet?), in which version of baselayout is this implemented?
Sorry baselayout-1.13.0_alpha9