configfs and systemd and dependencies

Jacek Konieczny jajcus at jajcus.net
Sun Jan 5 20:31:50 CET 2014


I am preparing 'targetcli' package for the iSCSI target configuration. I
have taken the systemd service file from Fedora, which says:

[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target

The 'Requires' line is important, configfs should be mounted at
/sys/kernel/config. But in PLD it won't mount by default ('systemctl
start sys-kernel-config.mount' won't work), because:

# systemctl status sys-kernel-config.mount
sys-kernel-config.mount - Configuration File System
   Loaded: loaded (/lib/systemd/system/sys-kernel-config.mount; static)
   Active: inactive (dead)
           start condition failed at Sun 2014-01-05 20:15:14 CET; 21s ago
           ConditionPathExists=/sys/kernel/config was not met

/sys/kernel/config does not exists, as the 'configfs' module is not loaded.

It seems sys-kernel-config.mount expects it being loaded by
systemd-modules-load.service – which means 'configfs' would be enabled
in {/etc,/run,/usr/lib}/modules-load.d which is not currently the case.

I wonder how to solve that right?
– remove 'ConditionPathExists=/sys/kernel/config' and use
'ExecStartPre=modprobe configfs' instead?
– put 'configfs' to modules-load.d? In what packages? Will that work
reliably without reboots?
– anything else?

Greets,
    Jacek


More information about the pld-devel-en mailing list