[systemd-devel] Systemd loads units before btrfs subvolumes are mounted

Rashmi Ranjan Mohanty RashmiRanjan.Mohanty at microfocus.com
Wed May 25 04:21:34 UTC 2016


Hi,

Our whole software is installed into /opt. So the systemd unit files are also there in /opt and the units are enabled to start on boot using the command "systemctl enable <Absolute Path of unit file>". But if the /opt is a subvolume on a btrfs file system, when the system boots, sometimes (or on some systems) systemd tries to load the units even before /opt subvolume is mounted. As a result it does not find the unit file and fails to load the unit. Once everything is mounted, if we try to start the units manually, everything works fine. Here is the snippet of the error....
---------------
# systemctl -l status novell-zenserver.service
novell-zenserver.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

May 24 14:17:30 linux-wb4y systemd[1]: Cannot add dependency job for unit novell-zenserver.service, ignoring: Unit novell-zenserver.service failed to load: No such file or directory.
---------------

So is there a way to tell systemd to not load the units till subvolumes (or a particular subvolume) are mounted ?
Other question is why does systemd not try to reload the units automatically later when subvolumes are mounted ? 

Thanks and Regards
Rashmi




More information about the systemd-devel mailing list