Automouting nfs using systemd - dolphin is erratic

I used autofs in the past with great success. I really want to go back to it, but it will not build reliably in the aur. So I tried using systemd automount feature in fstab but with mixed success.
At command line it is fine. if I list the dir structure, all mounts appear fine.
However dolphin does not seem to play well. Several mounts will not connect giving me the Operation not permitted error. Once I touch the mount with command line, shows up fine in dolphin.
Seems variable as to which mounts will play well, as each boot tends to provide different results.
I’ve done some research, and have played with the fstab options quite a bit. But to no avail.

Typical automount line in fstab currently looks is like this…
buckyu:/mnt/user/domains /mnt/nas/domains nfs4 noauto,noatime,async,soft,intr,rsize=32768,wsize=32768,_netdev,bg,x-systemd.requires=network.target,x-systemd.automount,x-systemd.device-timeout=1,x-systemd.idle-timeout=10min,timeo=14 0 0

If you have come across these problems I would be gratefull if you could share how you dealt with it…

Welcome here, @bucky_2780,

please post your full /etc/fstab. You may blacken details.

here it is… I’ve tried a few different params, but this is currently what I’m using…
I am using krusader atm, which is far more consistent with automount.


UUID=0796-1D89                            /boot/efi      vfat    umask=0077 0 2
UUID=99cf94c8-70e2-45d7-b0c1-14189ef9fb41 /              btrfs   subvol=/@,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=99cf94c8-70e2-45d7-b0c1-14189ef9fb41 /var/cache     btrfs   subvol=/@cache,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=99cf94c8-70e2-45d7-b0c1-14189ef9fb41 /var/log       btrfs   subvol=/@log,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=4a181880-2eec-4cf3-a019-58f6ce05f23e /home          ext4    defaults,noatime 0 2
UUID=394ba462-caea-403b-97ce-f690b31dc973 swap           swap    defaults,noatime 0 0
#
#*********
## -- NFS auto Mounts --- for fstab in manjaro
buckyu:/mnt/user/dl         /mnt/nas/dl         nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/tv         /mnt/nas/tv         nfs noauto,x-systemd.automount,timeo=14,hard,noatime 0 0
buckyu:/mnt/user/movies     /mnt/nas/movies     nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/music      /mnt/nas/music      nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/photo      /mnt/nas/photo      nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/office     /mnt/nas/office     nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/develop    /mnt/nas/develop    nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/finance    /mnt/nas/finance    nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/appdata    /mnt/nas/appdata    nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/dockerdata /mnt/nas/dockerdata nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/isos       /mnt/nas/isos       nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/domains    /mnt/nas/domains    nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0
buckyu:/mnt/user/backups    /mnt/nas/backups    nfs noauto,x-systemd.automount,timeo=14,hard,noatime,x-systemd.idle-timeout=10min 0 0

Please edit your post and use proper formatting via </> button or inserting 3 backticks ``` directly above and below the content.

Hi @bucky_2780, and welcome!

I believe you’d benefit from this: [root tip] Use systemd to mount ANY device, along with this: [root tip] systemd mount unit samples.

thanks bud, most appreciated.

I did a closer reading, and made a few more attempts to automount with fstab. However each time I do, at least a couple of mounts won’t succeed in mounting via dolphin… though with krusader its fine.

I’ve capitulated and wont bother automounting for the time being… I will simply do a proper mount, which works fine in the interim. When “autofs” starts compiling properly, I will go back to that.

thanks again…

You’re very welcome!

By automounting, do you mean it remains unmounted until accessed (mount-on-demand) or automagically mount when the computer boots?

Because my backup drive in mount-on-demand with that, following that exact tutorial, and it works like an absolute charm, so I’m going to go ahead and guess it would work for NFS as well.

Perhaps if you share more information you’d get better help. :man_shrugging:

Please see [HowTo] Increase your chances of solving your issue

The automount feature of systemd works fine. Upon boot, it is not mounted until someone or something tries to access a mount, and at that point it will “automount” the share. I also experimented with using the timeout parameter, which de-mounts the share after the specified time period. Works a treat.

Unfortunately, dolphin does not work well with this feature. Upon boot it fails to automount sevveral of the shares. Tapping on the mount produces an error as shown above.

If the mount times out, dolphin is also unable to reconnect… so does not play well with automount, in my experience.

Krusader works fine with automount. no problems there.

Autofs has always been better behaved in my experience, and I will go back to it, once it compiles cleanly in the aur.

Hope this helps someone else who experiments with it…

regards,

I have nfs automounts configured on my machine and they’ve been working flawlessly with doplhin. I’m using a nfs4 setup like this:

remote:/    /net/remote     nfs noauto,users,nodev,async,soft,_netdev,x-systemd.automount,x-systemd.device-timeout=1,x-systemd.idle-timeout=1min,x-systemd.mount-timeout=10,timeo=10,retry=3  0   0

thanks for posting freggel. I see you are using the “users” param… whcih is something I did not try. I will give it a go, and see what impact it might have.

further to this, the “users” param did the trick, and mounts come up nicely in dolphin. It also autoconnects after a device timeout… so well done. This is a winner. Curious this param is not better documented or talked about because I missed it even after several readings of the doco.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.