Contents
What should the Mount file name be in systemd?
If you are trying to have a systemd mount configuration then your file name should follow the following rule: Mount units must be named after the mount point directories they control. Example: the mount point /home/lennart must be configured in a unit file home-lennart.mount.
Where do you put Mount dependencies in systemd?
Systemd fabricates services for mounts; stumbling only slightly if they have hyphens in them: So, it should be possible to use before, after, requires, wants and friends to ensure that a service doesn’t start without its dependencies. Add the relationship on the mount unit. Add the relationship on the service unit.
Is the NFS mount a show stopper for systemd?
NFS, not so much. In my experience, systemd will start services implicitly dependent on an NFS mount the moment the network comes up. The mount might be there, it might be there in a little while, it might never turn up. It’s not considered a show stopper like block devices are.
What should I do if my mount unit does not start?
The only thing systemd can do is make sure that the mount unit does not start until networking on the client is set up correctly. Which in this case means that the local IP address that the server accepts is configured. A real fix must be implemented in mount.nfs.
What happens when systemd unmounts a device?
So, while the device is plugged in, ‘mount’ succeeds (literally and with exit status 0), and then systemd unmounts it in the background, while it is plugged in and successfully mounted. So from the user’s perspective, ‘mount’ seems to succeed and do nothing.
When to run systemd daemon-reload for failed Mount?
I guess I eventually found out by using Google that when mount seems to succeed but the mountpoint is not mounted, under Systemd, then one should run systemd daemon-reload and that will fix it.