I've installed Ubuntu 16.04 LTS Server using BTRFS and got the following setup according /etc/fstab
:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=0841ef72-e9d4-45ca-af22-a403783859c6 / btrfs noatime,nodiratime,subvol=@ 0 1
# /home was on /dev/sda1 during installation
UUID=0841ef72-e9d4-45ca-af22-a403783859c6 /home btrfs noatime,nodiratime,subvol=@home 0 2
This pretty much makes sense to me, but resulted in trouble with my systemd-setup. Im storing software for different customers in /home
and some of those provide daemons which should be started automatically during system boot by systemd. Something like the following:
/home/customer/someDaemon/cust_some_daemon.service
This can easily be deployed to systemd using systemctl enable ...
with the absolute path above. I don't need to manually copy or link things, systemd handles everything, systemctl enable ...
simply succeeds and links are created as expected.
What doesn't work is starting those services during boot time, systemd fails for all those services with a message that it can't find the linked files anymore. If I don't use /home
but store those files in /
directly or delete @home
to not be an additional subvolume anymore, everything works as expected.
There's the following sentence in the docs for enable
:
The file system where the linked unit files are located must be accessible when systemd is started (e.g. anything underneath /home or /var is not allowed, unless those directories are located on the root file system).
It's not clear to me what exactly the restriction is in this case: Is it the usage of an individual subvolume itself or is it because it needed to be mounted additionally? /
needs to be mounted and is a subvolume in itself as well, but that is supported obviously. Especially because of the dynamic nature of BTRFS and ZFS regarding subvolumes, I would have expected that systemd at least supports multiple subvolumes within some common root filesystem or pool as well. But it either doesn't or can't deal with the additional mount point.
So what exactly is the problem here? Thanks!
/
itself already as well, which it doesn't, but is left to initrd: unix.stackexchange.com/a/18055/174233 You should provide your comment as answer instead and explain more detailed what you mean withRequires
. Who should require what exactly? As systemd doesn't find my service files,Requires
in those shouldn't change much?