I often use sshfs to mount a remote directory to make it appear as local:
sudo sshfs -o allow_other myname@server:/remote/path /mnt/remote/
Occasionally there could be interruption to the connection so /mnt/remote
will appear as empty. If I try to re-run the above command, I'd get
'/mnt/remote:' Transport endpoint is not connected'
However I'm unable to (force) unmount the directory either:
sudo umount (-f) /mnt/remote
umount: /mnt/remote: target is busy
I'm wondering what can I do to re-mount the directory without rebooting my machine?
-o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3
in sshfs but doesn't work.