Announcement

Collapse
No announcement yet.

Get autofs to work or some other way to get NFS to disconnect off more quickly?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get autofs to work or some other way to get NFS to disconnect off more quickly?

    On my Kubuntu laptop, my NFS mounted share take 1.5 - 2 minutes to "disconnect" when I reboot or shutdown. Strangely, my Desktop running KDEneon does not. The only notable difference is wifi is usually used on the laptop while the desktop is ethernet only.

    I started out with the same setup on both - a mount specified in fstab with exactly the same options:
    Code:
    server:/ /shared nfs nofail,x-systemd.automount,x-systemd-device-timeout=10,_netdev,bg,hard,timeo=28,retrans=5,intr,noatime,nodiratime 0 0
    This never delays my desktop reboot. To verify, I manually unmounted the NFS share and the laptop shutdown quickly.

    Exploring a bit, I changed "hard" to soft and reduced "timeo" but no difference

    Then I attempted to set up autofs instead because supposedly it will automatically disconnect the share after a timeout period. However, no joy at all getting it to work. There's no errors and I followed every website write up I could find, but no mount.

    /etc/auto.master has this as the last line:
    Code:
    /shared /etc/auto.nfs --timeout=360
    and /etc/auto.nfs has this:
    Code:
    shared -fstype=nfs4,nofail,x-systemd.automount,x-systemd-device-timeout=10,_netdev,bg,soft,timeo=28,retrans=5,intr,noatime,nodiratime server:/
    Eventually, ​I took out every option except -fstype=nfs4 but still not working.

    I'm really just looking to reboot in a normal fashion, but I also don't want the NFS share to "hang" me when I'm not on my home network.

    Please Read Me
Working...
X