r/freebsd • u/spuntotheratboy • 4d ago
help needed Instability in sshfs
I'm having problems with sshfs, and I don't know if there's an inherent instability in the tool, or in my system, or if it's to do with my very slow internet connection — or if I'm just using it badly. Can anyone help?
fusefs-sshfs-3.7.6, FreeBSD 15.1-RELEASE-p7, on a 2013 MacBook Pro with a USB wifi dongle made out of snails.
I mount a remote file system, it works. I list the contents of the mount point, it's good. I list a sub-directory, that's good too. But as I drill down, eventually I get "No such file or directory" and at that point it's all gone! The same thing happens if I just leave it alone for more than a couple of seconds, and it's the same whether I use ls or an Xorg file manager. If I go back to the mount point then I can see the contents again, rinse and repeat. If I open a file then it will probably load, but it'll drop after a couple of seconds.
Using rclone to mount my Dropbox works perfectly, at least I haven't encountered any issues.
Here's an example of my mount command:
sshfs -oIdentityFile=[LOCAL_PATH_TO_PRIVATE_KEY] [REMOTE_USER]@[REMOTE_IPV4]:/ [LOCAL_PATH_TO_MOUNT_POINT] -oServerAliveInterval=15
I've tried a few different values of ServerAliveInterval — 15 as above, also 1, something else I think, but I don't remember any of that making any difference.
Er... so I guess I'm doing something stupid and obvious, and I'd be really grateful for any advice!
Thaks so much,
Ben
3
u/Chester-Berkeley desktop (DE) user 4d ago
Cute octopus btw
3
u/Lord_Mhoram 4d ago
I can't help with this, as when I tried sshfs, it made magit in emacs unbearably slow due to the large number of filesystem calls it does. I had similar trouble with tramp on remote files.
But that led me to mutagen, which uses rsync to keep local and remote directories synced up. I've been using it for a few months now, and it's been excellent, so I'd suggest giving it a try if you can't work this out. You do need rsync on the remote system.
3
u/grahamperrin Claude user 4d ago
Probably not stupid :-)
You could debug, if Osmereldo is agreeable. Something like:
sshfs user@host:/ /mnt/point -oIdentityFile=/path/to/key -f -dYou might see a remote SFTP status, or a local FUSE error.
Also/alternatively: have you tried turning off the caches?
1
u/Alarmed_Contest8439 4d ago
hm, what network card?