You are not logged in.

#1 2018-05-02 06:48:09

bergentroll
Member
Registered: 2016-08-23
Posts: 31

[SOLVED] Issues with Systemd NFS automount

I am using Systemd automount for my NFS share. There is my configs:

#/etc/systemd/system/mnt-storage.mount 

[Unit]
Description=Storage on grotten

[Mount]
What=grotten:/mnt/storage
Where=/mnt/storage
Type=nfs4
Options=rw,_netdev
LazyUnmount=yes
#/etc/systemd/system/mnt-storage.automount 

[Unit]
Description=Automount storage on grotten

[Automount]
Where=/mnt/storage
TimeoutIdleSec=300

[Install]
WantedBy=remote-fs.target

mnt-storage.automount is enabled. Also I have a storage symlink in my ~/ to /mnt/storage.

I have two annoying trobles with this mount.

1. On shutdown or reboot there is "Stop job is running for mnt-storage.mount" with 90 sec timeout.
VuwTejL.jpg
Workaround is unit

#/etc/systemd/system/mnt-storage-unmount.service 

[Unit]
Description=unmount-nfs shares from raspi-nas
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target

[Service]
ExecStart=/usr/bin/umount /mnt/storage
Type=oneshot

[Install]
WantedBy=shutdown.target

It works fine, but it seems like dirty way. I want Systemd to umount in propper way.

2. When I have no connection to my NFS server (e. g. network is down or I am in other network), file manager (e. g. Thunar) stucks to show me my home.
I tried the soft option, but it did not take any effect.

So how can I deal with my mount?

Last edited by bergentroll (2018-05-03 15:36:59)

Offline

#2 2018-05-02 14:47:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,953

Offline

#3 2018-05-03 15:03:42

bergentroll
Member
Registered: 2016-08-23
Posts: 31

Re: [SOLVED] Issues with Systemd NFS automount

seth, so, well. Thank you — this options defenetly help with shutdown and reboot issue, but I still have freezes on my file-manager while network is not available.

Last edited by bergentroll (2018-05-03 15:05:37)

Offline

#4 2018-05-03 15:14:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,953

Re: [SOLVED] Issues with Systemd NFS automount

You could strace thunar to get an idea what it's doing when blocking.

Edit: it might be relevant whether gvfs and/or thunar-volman are installed.

Last edited by seth (2018-05-03 15:15:42)

Offline

#5 2018-05-03 15:36:30

bergentroll
Member
Registered: 2016-08-23
Posts: 31

Re: [SOLVED] Issues with Systemd NFS automount

Exactly! Without thunar-volman there is no hangs anymore. Thank you again!

Offline

Board footer

Powered by FluxBB