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

Franck Bui fbui at suse.com
Thu May 26 06:28:25 UTC 2016


On 05/25/2016 05:21 PM, Lennart Poettering wrote:
> On Tue, 24.05.16 22:21, Rashmi Ranjan Mohanty (RashmiRanjan.Mohanty at microfocus.com) wrote:
> 
>> 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....
> 
> This is simply not supported. Services to be started at boot must be
> accessible when systemd transitions from the initrd into the host
> system. Thus, if you place them in /opt, and make /opt an independent
> mount, then systemd won't cover this. Unit files are really like
> /etc/fstab itself, they cannot be split out into a different FS
> mounted later. (this is because we want to determine the initial
> transaction only once, at very early boot, and we can do so only if we
> actually know everything to start)
> 

And I guess the same applies to the udev rules.



More information about the systemd-devel mailing list