I don't know if any one can help with this but I will give it a shot. I am trying to get auto-mounting working with systemd files. I know it can be done in the fstab but I want to try and get it working with the systemd files.
My under standing is that you need a .mount file and a matching .automount file and they should be in
In my case I am trying to nfs4 mount server1:/data at /data. I would like to have it available in the equivalent of run levels 3 and 5.
So first I created the file data.mount as follows.
I then created the file data.automount
Description=Data Directory Automount Point
multi-user.target is a requirement of graphical.target so I figured if I installed it in multi-user.target it would be available in both. So I run
systemctl enable data.automount
And it does the following just like I wanted.
ln -s '/lib/systemd/system/data.automount' '/etc/systemd/system/multi-user.target.wants/data.automount'
But if I reboot the system and come up into the graphical.target then check the status the data.automount service is in the failed state. But if I do
systemctl start data.automount
it starts just fine. Permissions on both files I created are 644 just like the others. Can any one give me some advise for what I am doing wrong?
It seems pretty well every distro is giving systemd a go and there is documentation popping up, but I haven't seen any examples of systemd automount yet.
Some pages I looked at
Thanks for any help.