I am using a laptop to access files on a remote research cluster. Originally I used a static mount with fuse and sshfs configured in /etc/fstab. This worked reasonably well on a workstation with constant internet access. On my laptop, any change to connectivity (short connectivity loss, changing wifi network, sleep mode) would render the static mounts unresponsive and hang any file operation that tried to access them.

After some research it looked like autofs might be a better solution as it mounts the remote locations on demand and expires them after some time. Maybe I misunderstand the differences between autofs and my previous setup. In practice I notice similar issues:

  • if the remote location is currently mounted through autofs (recent file access) and the connection changes, I exerience the same mount freeze
  • no longer the case, see edit (if the remote location is not mounted and the connection changes, the remote location does not get mounted. accessing the mountpoint return No such file or directory)

Now I am not particularly experienced with either autofs or file system questions. I tried following the recommendations in this question but unfortunately this didn't fix my problems.

My current mount options in /etc/auto.sshfs are:


My question is:

  • is the kind of dynamic and connection unspecific mounting I am looking for even possible or intended with autofs?
  • if yes, how should I configure it to achieve this?
  • if no, what would be a better way to achieve this?

Many thanks for your help!

edit: I believe that the soft option is invalid in the context of fuse as file system. After removing the option, my setup works as long as I don't loose/change connection when the remote location is mounted.


sshfs is built on ssh, which in turn uses TCP. You can't move an endpoint with a TCP connection and expect it to survive.

You might be able to layer it on top of a UDP based protocol, which might help with a change of IP address, but this still wouldn't help with a loss of connectivity freezing your mount point.

  • thanks for the reply. I don't expect it to survive. I expect that the fact it does not survive doesn't lead to a freeze of the mount point. – surchs Mar 10 '17 at 0:20
  • The mount subsystem expects a working network connection. In the case of sshfs this is layered on top of ssh. When you lose your ssh connection you use the working network connection. The mount subsystem is waiting for the connection to be restored. – roaima Mar 10 '17 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.