Follow

What better for mounting local network storage on Linux? Samba, WebDAV or rclone using SFTP?

· · Web · 6 · 0 · 2
@matrix
>rclone using SFTP
sshfs exists lol. probably smb is your best bet yeah

@opal Cool, wasn't aware of that. I'm of the opinion too.

@matrix it's either that or nfs, and nfs is really fucking jank
@matrix you can use kerberos with nfs, but again nfs is a dumpster fire in its own right

@sjw @opal 3.0 does. The storage boxes can be accessed from outside.

@matrix @matrix nfs is just the raw filesystem. route it over wireguard if you want encryption

@opal
@opal @matrix for me NFS has been working great with FreeNAS/TrueNAS, however two aspects of it is that sever has to have decent network adapter and you must not share same directories with anything else, really. Real jank comes with the "one share per device" restriction of NFS which is easily circumvented with ZFS's nested datasets in my case.

My previous experience (JBOD on Linux) was less than stellar, but at least network wasn't a problem.
@hj @matrix in my case i built kernel and userland for nfs on my homeserver, built it on my desktop, and for the life of me couldnt debug why they wouldnt communicate even with the logs. some bug i forget about now, maybe it's all been fixed upstream by now, but i've been lazy to try
@opal @matrix for me the only problem before was the "stale descriptor" or something, i couldn't access file and needed to restart the server, most likely caused by me fucking around with bind mounts to circumvent NFS's limitations and/or sharing same files between different protocols.

my only current problem is that FreeBSD's network drivers are shite, and i have to use usb3 ethernet adapter which uses different (non-realtek) chip and works much much better, but still has same issue just rarer where whole thing just drops out of the network, and the NIC driver just fukcing dies requiring (you guessed it) a reboot.
@matrix @hj @opal @matrix JBOD on Linux is a lot better now that ZoL is a thing.

TrueNAS is actually switching to Debian for their TrueNAS Scale line which actually seems to be pretty interesting.

It's GlusterFS on top of ZFS and will automatically manage Kubernetes and KVM.

It's kind of a single solution for high availability storage clusters + compute clusters + user management/authentication.

It's actually pretty interesting and I'd like to play around with it.

Kind of the ideal setup for a home lab IMO.

It's still in Alpha tho so I probably wouldn't want to use it in production.
@matrix NFS if you're just doing linux-linux (or any unix) - it's the fastest but least secure (literally depends on your network being secure, unless you want to mess with kerberos). Samba is a bit more secure and a bit more cross-compatible but might have issues. WebDAV and FTP((E)S) are not really meant for "mounting" but can work, but with other protocols those are usually used for remote access. SFTP i.e. file transfer over SSH, is THE slowest, compatibility on other devices can be worse than FTP((E)S). Lastly, if you're just mounting a folder on one device ever and never going to share it - iSCSI is probably the way to go.

Lastly - word of advice - don't share same directory using multiple protocols at same time (especially if one of those protocols is NFS), it's doable but not very stable, and different servers will get really confused about ACLs.
@matrix and if you just want to sync files between machines and don't care about disk usage - syncthing so far has been THE best tool around.

@hj I want to mount Hetzner's storage box so I can't use NFS.

@matrix for hetzner boxes just use CIFS aka samba (i think), that's what I do for storage on tube.ebin.club . Hetzner boxes aren't really block storages or filesystems, more like file storages, so their inner working is closer to FTP functionally. NFS is closer to block storage and being well an actual filesystem.

iSCSI is actual networked block storage, i.e. your PC will be writing raw data and you can use any actual filesystem.

FTP/CIFS/WebDAV/SFTP are just a protocol to access bunch of files on any remote filesystem.

NFS fits somewhere weirdly in between, letting you access remote filesystem rather than just bunch of files. It's... weird.
@matrix @matrix @hj oh! In that case probably SSHFS.

Might also look into something that's an abstraction layer to encrypt the files at rest
@matrix @matrix @hj Something like eCryptfs should be able to do it.

However you mount it, it'll act as an abstraction layer. It'll encrypt the files before sending them to the storage backend and decrypt them after retrieving them all completely transparent to you.

@matrix@gameliberty.club I'd recommend NFS if you're using GNU/Linux exclusively. Samba is definitely the easiest solution to set up for your users as it has the best support on other operating systems. WebDAV is fine too but slightly harder to set up.

Instead of rclone I'd recommend simply using SSHFS tho.

@matrix@gameliberty.club Also yes, you can mount NFS in Windows, but it is not recommended because you'll need to expect your users to open the command prompt. While Samba just gets easily auto discovered by your users.

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.