Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A third-party program will write files to a SSHFS mounted dir. If the internet connection is lost, the third-party program will likely crash (badly), because all programs trying to access such an SSHFS mounted dir in such a state (when there's no internet connection) are put into what some describe as "uninterruptible sleep". SSHFS has an option to auto-reconnect, but this doesn't help, as the third-party program will still hang (and crash) if the connection is lost (even though when the connection is restored, SSHFS will remount the dir). Autofs will not help, basically it's about the behavior of SSHFS when the connection is lost. Why can't it behave like a network shared directory (Samba or other means) and simply return an error sooner rather than... never?

Are there alternatives to SSHFS if SSHFS can't work as described?

Other info:

OS: I'm using Ubuntu Linux (12.04 LTS)

share|improve this question
    
Please explain what exactly you are doing. I imagine you are mounting a remote filesystem using sshfs on a local Linux machine, is that so? Perhaps include your /etc/fstab? Have you tried autofs with the soft option? –  terdon Apr 11 '13 at 16:45
    
@terdon A third-party program will write files to a SSHFS mounted dir. If the internet connection is lost, the third-party program will likely crash (badly). SSHFS has an option to auto-reconnect, but this doesn't help, as the third-party program will still hang (and crash) if the connection is lost (even though when the connection is restored, SSHFS will remount the dir). Autofs will not help, basically it's about the behavior of SSHFS when the connection is lost. Why can't it behave like a network shared directory (Samba or other means) and simply return an error sooner rather than... never? –  Andrei Apr 11 '13 at 17:11
    
Thanks for the update but please include it in your question since not everyone reads the comments. Also include the config files you are using. What is the value for ssh timeout etc? I am not saying I know how the answer, its just that the more information you have in your question, the likelier it is that you will get a good answer. As it stands, it is hard to understand what exactly your setup is. –  terdon Apr 11 '13 at 17:17
    
@terdon Thanks, I basically now almost replaced my question entirely. –  Andrei Apr 11 '13 at 17:21
    
Much better :). Please also add the OS you are using. Is this Linux, OSX, another Unix? –  terdon Apr 11 '13 at 17:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.