User Tools

Site Tools


linux:sshfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:sshfs [2020/07/19 23:53] – created Wulf Rajeklinux:sshfs [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== sshfs auto reconnect ====== ====== sshfs auto reconnect ======
  
-Scenario: using SSHFS mounts from my laptop to a central server, the SSHFS mount is broken after a longer disconnect (e.g. during suspend), cause the underlying SSH connection timed out.+Scenario: using SSHFS mounts from laptop to a central server, the SSHFS mount is broken after a longer disconnect (e.g. during suspend), causing the underlying SSH connection to time out.
  
  
 Use -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 Use -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3
  
-The combination ServerAliveInterval=15,ServerAliveCountMax=3 causes the I/O errors to pop out after one minute of network outage. This is important but largely undocumented. If ServerAliveInterval option is left at default (so without the alive check), processes which experience I/O hang seem to sleep indefinitely, even after the sshfs gets reconnected. I regard this a useless behaviour.+The combination ServerAliveInterval=15,ServerAliveCountMax=3 causes the I/O errors to pop out after one minute of network outage. This is important but largely undocumented. If ServerAliveInterval option is left at default (without the alive check), processes which experience I/O hang seem to sleep indefinitely, even after the sshfs gets reconnected.
  
 In other words what happens on -o reconnect without assigning ServerAliveInterval is that any I/O will either succeed, or hang the application indefinitely if the ssh reconnects underneath. A typical application becomes entirely hung as a result. If you'd wish to allow I/O to return an error and resume the application, you need ServerAliveInterval=1 or greater. In other words what happens on -o reconnect without assigning ServerAliveInterval is that any I/O will either succeed, or hang the application indefinitely if the ssh reconnects underneath. A typical application becomes entirely hung as a result. If you'd wish to allow I/O to return an error and resume the application, you need ServerAliveInterval=1 or greater.
linux/sshfs.1595199204.txt.gz · Last modified: (external edit)