Hello everyone,
I have a question regarding the correct usage of systemd in my case. My requirements:
- first start the network stack (network-online.target)
- then start a vpn (vpn.service)
- then mount a ceph distributed filesystem (ceph.mount, generated from fstab)
- then start services that use that filesystem
At the moment, the vpn is started too late, and the machine can't mount the ceph volume. It fails to the
emergency console.
I tried:
systemctl edit vpn.service
Wants=network-online.target
Requires=network-online.target
systemctl edit ceph.mount
Wants=vpn.service
Requires=vpn.service
.... and so on down the dependencies
But it does not work. systemd create override files in /etc/systemd/system but they don't seem to work.
If I do a systemd-analyse dot it doesn't show the changes, and the system still boots into the emergency console.
It would be quite easy to now say bad things about systemd because sure I would know how to fix this in Sysvinit, but maybe someone can enlighten me what the proper procedure with systemd is?
I can't figure it out.
By the way, the same problem is on shutdown. It tries to unmount the ceph volume before all services that keep files open there are shutdown. It takes about 5 minutes and a hard kill to finally shutdown.
Would appreciate pointers how to solve this problem the proper way.
System: Debian 10 Buster all updates amd64
thanks,
Santosha