You are not logged in.
Pages: 1
I'm attempting to get sshfs to automount on demand. I've managed to successfully get it to load on boot by adding the following to /etc/fstab:
user@host:/home/user/RemoteFolder /home/user/MountFolder fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,Port=22,IdentityFile=/home/user/.ssh/id_rsa,allow_other,reconnect 0 0Which works great and as expected. However, I've discovered that if the server fails for any reason (in my example, simply pulling the LAN cable) then any application using sshfs will crash/hang, specifically Nautilus. I've seen some suggestions on how to correct this issue using inline commands, but haven't been able to find any help to fix my issue with the fstab implementation.
I've tried adding additional commands, including:
ServerAliveInterval=15,ServerAliveCountMax=3After 'reconnect' in my fstab line above, however it hasn't fixed my issue. Any suggestions would be appreciated.
Thanks.
Offline
"/home/user/" being $HOME?
https://wiki.archlinux.org/index.php/SS … C_Gedit.29 ?
Offline
"/home/user/" being $HOME?
https://wiki.archlinux.org/index.php/SS … C_Gedit.29 ?
Thanks for the tip, but that's not it. The hang/freeze only occurs when the network is no longer available (i.e. me pulling the LAN cable).
Having just tested this again now, I don't think hang/freeze is the right word as I can still navigate through the left-side tabs in Nautilus, and open new instances of Nautilus, but whenever I click the 'Home' tab it will not load anything and all I get is a spinning wheel and 'loading...' in the bottom right of the Window.
Once I plug the LAN cable back in I get everything back within about 5 seconds. It feels like I'm almost there, I just need to get the system to handle the dropped connection correctly so that it still displays the folders in Home when there is no connection.
Offline
Some preview feature? (looking into the folder)
You could "strace nautilus 2>&1 | grep -E '(stat|open)' to see what is approached.
Other things would be "nodiratime".
To be sure, you're aware that the ServerAlive* settings you use take a minute to time out?
Also ensure you didn't deactivate TCPKeepAlive eg. in the ssh config.
Offline
Pages: 1