I have a laptop with debian that I am mainly using on my home wifi. To access some network disks, I have a few lines like these in /etc/fstab:

disk:/media/vol0 /home/disk0 nfs4 noauto,x-systemd.automount,x-systemd.device-timeout=10
disk:/media/vol1 /home/disk1 nfs4 noauto,x-systemd.automount,x-systemd.device-timeout=10

This works great when accessing, when I access the /home/disk1 directory on the laptop, the disk is being mounted. The problem is when shutting down, then my wifi is a user connection so it goes down when my user is logged out. Then the nfs unmount will hang. It used to be a 90 second delay which was a bit annoying, but acceptable, but after the last debian upgrade, it seems to be a infinite delay to retry to umount a nfs-disk when the server is unavailable. (I have so far not been waiting for a long time, this is according to the messages during shutdown) This means that I have to force shutdown the machine and I never get a clean umount of / among other problems.

The root cause for this problem is of course that I have a user defined network and a system defined nfs mount. I (think I) know how to define the wifi connection as a system service, but that would make other things difficult, so I wonder:

  • Is there a setting to make the nfs a user defined mount so it would be taken down before the wifi connection goes down? or,
  • How can I set the timeout for the umount?

(When typing this question, I realized that a possible workaround would be to set a idle time out on the nfs mount so it automatically unmounts when it is idle for a while, but for this to work, the timeout would have to be so short that it manages to unmount in the timespan from the last process accessing the mount is killed to the wifi is taken down, so maybe not)

  • Try appending ,_netdev option to inform systemd about this is a network dependent mount. Jul 7, 2023 at 15:34

1 Answer 1


x-systemd.requires=network-online.target value was suggested in a forum as to inform systemd that the mount requires networking to be alive, the second one was suggested by @ipor-sircer as a comment to your question

You might need to reload systemd sudo systemctl daemon-reload and remount the partitions for the changes to take effect

I was having some similar issue, my system was not able to shutdown due to mount points were waiting for NFS, I added x-systemd.requires=network-online.target,_netdev to my fstab and my system can now shutdown without issues

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .