What is a better way to deal with server disconnects of sshfs mounts?
81
votes
8
answers
68989
views
I have several directories mounted through *sshfs*. I sometimes get disconnects from the server (not configurable by me). I usually mount the directories like this
sshfs user@server.example.com:/home/user /mnt/example
When a server disconnects, the sshfs subsystem doesn't *umount / free* the directory but instead locks it inaccessible. The mount is still visible when typing
mount
. When I type
ls /mnt/example
the process gets locked (also Ctrl+c doesn't help). I therefore do
sudo umount -l /mnt/example
# find pid of corresponding process:
ps aux | grep example.com
kill -9
Is there a better way to deal with this? Obviously *sshfs* should do the *umount* and clean up... Ideally it would reconnect automatically.
Asked by Sebastian
(8909 rep)
Jun 1, 2011, 10:00 AM
Last activity: Apr 14, 2024, 01:09 PM
Last activity: Apr 14, 2024, 01:09 PM