SystemD: When to start service for file system kernel module

Lennart Poettering mzerqung at 0pointer.de
Wed May 23 23:41:30 UTC 2012


On Wed, 23.05.12 14:23, Richard Shaw (hobbes1069 at gmail.com) wrote:

> Short story:
> I'm working on creating kernel module packages for the ZFS file system
> from zfsonlinux.org to be hosted at RPM Fusion and will utilize the
> akmods utility to make sure that new modules are built on kernel
> update.
> 
> Problem:
> The zfs package also needs the SPL (Solaris Porting Layer) kernel
> module so I have to control the order the kernel modules are built and
> installed as the SPL one also has a kernel version specific devel
> package that ZFS needs to build.
> 
> Question:
> What is the right way to make sure it's built prior to mounting non
> system volumes? Obviously you can't have your system volume be ZFS
> with this setup, but with the current performance and stability, you
> wouldn't want to.

This is not a solvable problem. You should not attempt the build before
having the local file systems mounted (i.e. the right /var and /tmp is
around, and tmpfiles ran, and a couple of other things). But your module
might be needed to mount the local file systems. These two requirements
are mutually incompatible.

The whole idea of akmods (to compile kernel modules early at boot) is
simply flawed. If you want to do such a thing then compile the modules
when you install the updated kernel, not at boot, when it is too
late. This is particularly the case for drivers and suchlike which
should be loaded by udev as the devices become available, but you don't
want to do builds before udev is started.

Sorry if this is disappointing,

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list