Hey #linux #debian people: it’s occurring to me that #rclone might not actually be the best way to do what I’m doing. So: if you had two Debian servers on a vpn, both with 1 gig fiber links to the internet, in cities 100 km apart, how would you go about having shared filesystems between them? Right now I am using rclone mount with sftp. Is there a less janky way?
@fastfinge I haven't actually set this up before, but NFS seems like the way to go around this (network filesystem).
@fastfinge what kind of files?
I would consider syncthing as an option in some scenarios. It requires more disk space (files are synchronized) and potentially can have conflicts. But on the other hand, you can continue using files if the connection is broken, and latency is 0.
Otherwise sshfs or an sftp mount could be fine.
There are more sophisticated solutions, if you have very demanding requirements.
Thanks for the help, everyone! #NFS is the way to go, and a lot simpler than I thought. For anyone discovering this later, the guide I'm using is this one: github.com/zilexa/Homeserver/tree/master/Filesystems-guide/networkshares_HowTo-NFSv4.2 Credits to everyone for the suggestions, ideas, and assurance that this isn't going to be as hard as I thought it would be: @yo, @dlakelan, @tripplehelix, @quanin, @modulux,
@fastfinge
BTW Pretty sure the /srv stuff isn't even necessary anymore if you share more than one folder.
@yo @tripplehelix @quanin @modulux
@yo The issue with syncthing is that one machine has 200 tb of storage, and the other has 2 tb. So syncing isn't an option. :-)
@fastfinge ah, then I'd suggest NFSv3 over the VPN (I missed that you had already mentioned you had a VPN).
I use NFSv3 over a VPN and it works quite well. You could also use Samba/CIFS if you want to share with other operating systems.
Traditionally, local file systems do not perform well over the Internet and are unsafe. But a VPN takes care of security, and with fiber, I find NFS and Samba decent.
@modulux The thing that scares me about nfs is that it’s an ancient protocol, and authentication and encryption feel like a bolted on mess. Especially because I haven’t set up Pam or whatever to share accounts between the systems. So I’m confused about what happens when nfs tries to sync permissions.
@fastfinge It's ancient, but there's been relatively newer versions. That said I'm only talking from second-hand knowledge since I never needed to set this up. Another option you might consider is sshfs.
@modulux @fastfinge NFS (even v3) with a VPN would be fine. I use it and works fine. I proposed Syncthing in the top post of this thread too.
There's a distinct lack of WAN-friendly shared filesystems. So I would suggest either VPN + traditional shared filesystem, syncthing, or something SSH-based (like the rclone you are already using, or the already suggested sshfs).