winfsp / sshfs-win

SSHFS For Windows
https://winfsp.dev
Other
5.16k stars 261 forks source link

Mapped network drive disconnects after some time #194

Open berguner opened 4 years ago

berguner commented 4 years ago

Hello,

I am using winfsp-1.7.20123 and sshfs-win-3.5.20024-x64. I use windows explorer's Map Network Drive to mount the remote drive using the address \\sshfs.r\username@remote_ip\. The mounted drive disappears after an hour or so without any reason and I have to mount it again. Do you have any solution for this?

Thanks, Bekir

billziss-gh commented 4 years ago

It would be good to figure out why the drive disconnects. For example, it may be that the server disconnects idle connections after some time.

In any case the latest beta version of WinFsp includes a registry setting that allows the file system to be restarted in such cases:

With this setting the file system will be automatically restarted if you do not stop it explicitly.

Please note that this setting is experimental.

berguner commented 4 years ago

Thank you for the suggestion. I set the registry value and it is working for one of my computers but not for the other one. I am mounting the same server. Is there any way to troubleshoot this further, any log files that I can check?

billziss-gh commented 4 years ago

The Event Viewer will contain entries for when the file systems are started/stopped (look for the "WinFsp" source).

berguner commented 4 years ago

I changed the drive letter on the computer which was disconnecting and the recovery works fine now. It still disconnects sometimes but it isn't an issue because it reconnects quickly. Somehow recovery for the old drive letter (V) doesn't work even if I mount another server. Seems like I have one letter less for sshfs but I think I can live with the rest of the alphabet :)