I'm "use NFS forfilesharing" old. what's the current optimal solution for shared drives if I have like 3 linux machines in the house?
from BonkTheAnnoyed@lemmy.blahaj.zone to selfhosted@lemmy.world on 29 Aug 02:07
https://lemmy.blahaj.zone/post/31008301

I recently replaced an ancient laptop with a slightly less ancient one.

Left to my own devices I’d probably rsync for 90% of that, but I’d like to try something a little more pointy-clicky or at least transparent in my dotage.

Edit: Not SAMBA (I freaking hate trying to make that work)

Edit2: for the young’uns: NFS (linux “network filesystem”)

Edit 3: LAN only. I may set up a VPN connection one day but it’s not currently a priority. (edited post to reflect questions)

Last Edit: thanks, friends, for this discussion! I think based on this I’ll at least start with NFS + my existing backups system (Mint’s thing, which is I think just a gui in front of rcync). May play w/ modern SAMBA if I have extra time.

Ill continue to read the replies though - some interesting ideas.

#selfhosted

threaded - newest

SidewaysHighways@lemmy.world on 29 Aug 02:13 next collapse

truenas is cool. I’ve only used core so far, but i hear scale is taking over

BonkTheAnnoyed@lemmy.blahaj.zone on 29 Aug 02:42 collapse

this looks promising. Seems a little heavy-weight at first glance… How was it to get up and running?

SidewaysHighways@lemmy.world on 29 Aug 03:40 next collapse

the GUI makes it pretty painless. it was my first real attempt at self hosting anything, my first experience with any kind of NFS/SMB setup at all. i was running it as bare metal for around 2 years before using installing as a vm on proxmox.

tofu@lemmy.nocturnal.garden on 29 Aug 07:05 collapse

It’s heavy and it doesn’t like if you tinker with the box in Non-TrueNAS ways. In the end it’s a convenient shiny gui for ZFS and NFS. But it (or ZFS) needs some RAM (minimum 8 I think), so I’m not sure about it working on your old laptop.

vk6flab@lemmy.radio on 29 Aug 02:14 next collapse

I use sshfs.

cmnybo@discuss.tchncs.de on 29 Aug 02:14 next collapse

NFS is the best option if you only need to access the shared drives over your LAN. If you want to mount them over the internet, there’s SSHFS.

BonkTheAnnoyed@lemmy.blahaj.zone on 29 Aug 02:43 next collapse

See, this is interesting. I’m out here looking for the new shiny easy button, but what I’m hearing is “the old config-file based thing works really well. ain’t broken, etc.”

I may give that a swing and see.

curbstickle@lemmy.dbzer0.com on 29 Aug 02:57 collapse

I’m at the same age - just to mention, samba is nowhere near the horror show it used to be. That said, I use NFS for my Debian boxes and mac mini build box to hit my NAS, samba for the windows laptop.

roofuskit@lemmy.world on 29 Aug 03:03 next collapse

Yeah, Samba has come a long way. I run a Linux based server but all clients are Windows or Android so it just makes sense to run SMB shares instead of NFS.

ImgurRefugee114@reddthat.com on 29 Aug 03:40 next collapse

I’ve always had weird issues with SMB like ghost files, issues with case sensitivity (zfs pool), it dropping out and me having to reboot to re-establish the connection… Since switching to Linux and using NFS, it’s been almost indistinguishable from a native drive for my casual use (including using a ssd pool as a steam library…)

roofuskit@lemmy.world on 29 Aug 03:45 collapse

I can definitely say in the past I had similar experiences. I haven’t really had any problems with SMB in the last 5 years that I can recall. It really was a shit show back in the day, but it’s been rock solid for me anyway.

lightnsfw@reddthat.com on 29 Aug 09:49 next collapse

Same. I’ve used SMB for years. Don’t have any problems with it across all my Windows and Android devices. Pretty sure I had an iPad in there at one point as well.

WhyJiffie@sh.itjust.works on 29 Aug 13:36 collapse

you and perhaps @curbstickle@lemmy.dbzer0.com, may I ask if you use samba with portable devices, like laptops?

I do and my experience is that programs that try to access it when I don’t have network access tend to freeze, including my desktop environment, but any file managers too if I click the wrong place by accident. but it occurs enough without user action too.
oh and it breaks all machines at once if the server or network is down. which is rare but very annoying.

did you experience this too? do you have some advice? is SMB just unsuitable for this?

honestly I would prefer if the cifs driver would keep track of last successful communication, and if it was long ago instantly fail all accesses. without unmounting so that open directories and file handles keep being valid.
and if all software on this world wouldn’t behave as if they were doing IO on the main thread. honestly this went smoother with windows clients but I’m not going back.

roofuskit@lemmy.world on 29 Aug 14:09 next collapse

Honestly no, that’s not really my use case. My PC is running over a 2.5G cable. Funny enough, my wife and kid’s laptops rarely leave the house. I have experienced some wait time if the server is down while the PC looks for it, but nothing so drastic as locking things up. That particular window will just be spinning for a bit trying to find the server over the network.

curbstickle@lemmy.dbzer0.com on 29 Aug 16:16 collapse

Only windows devices (laptop I use for work stuff). The other laptops are Linux (NFS) or Chromebooks (for the kids, no access).

Devices don’t really leave often (aside from mine), so not much of an issue. If the NAS is offline, not much else would be going on either.

Bakkoda@sh.itjust.works on 29 Aug 12:34 collapse

I’ve run Proxmox hosts with smb shares for literally a decade without issue. Performance is line speed now. Only issues I’ve ever had were operator error and that was a long time ago. SMB 3 works great.

non_burglar@lemmy.world on 29 Aug 03:08 next collapse

I agree, NFS is eazy peazy, livin greazy.

I have an old ds211j synology for backup. I just can’t bring myself to replace it, it still works. However, it doesn’t support zfs. I wish I could get another Linux running on this thing.

However, NFS does work on it and is so simple and easy to lock down, it works in a ton of corner cases like mine.

needanke@feddit.org on 29 Aug 07:08 next collapse

Afaik Synology supports Btrfs which I honestly prefer at this point if you don’t need filesystem based encryption or professionall scaling and caching features.

non_burglar@lemmy.world on 29 Aug 11:58 collapse

The ds211j is on synology DSM 6, which is ancient. I’ll look again, but I don’t think it supports btrfs.

athairmor@lemmy.world on 29 Aug 12:53 collapse

The lower end Synology NAS (like my DS420j) don’t support btrfs. They only support ext4, I think.

antithetical@lemmy.deedium.nl on 29 Aug 11:25 collapse

NFS is easy as long as you use very basic access control. When you want NFSv4 with Kerberos auth you’re entering a world of pain and tears.

non_burglar@lemmy.world on 29 Aug 11:56 collapse

I don’t use access control, I lock down with networking and filters.

pastermil@sh.itjust.works on 29 Aug 04:29 next collapse

What about NFS over the internet?

cmnybo@discuss.tchncs.de on 29 Aug 04:55 next collapse

You can use NFS over the internet, but it will be a lot more work to secure it. It was intended for use over a LAN and performance may not be great over the internet, especially with high latency or packet loss.

Keelhaul@sh.itjust.works on 29 Aug 05:45 collapse

I would just create a point to point VPN connection and run it over that (for axample an IPsec tunnel using strongswan)

fmstrat@lemmy.nowsci.com on 29 Aug 13:32 next collapse

My one change: I do SSHFS over LAN, because of guest machines and sniffing potential.

I do NFS on direct wire or on a confidently set up VLAN (maybe).

Zos_Kia@lemmynsfw.com on 29 Aug 16:44 collapse

I use exclusively sshfs, including in my lan, is there some downside to it?

cmnybo@discuss.tchncs.de on 29 Aug 20:05 collapse

SSHFS is slower than NFS due to the encryption and FUSE. It’s not a huge difference with a modern CPU and a 1 gbps connection, but it can be significant with an older CPU or a faster network.

AppearanceBoring9229@sh.itjust.works on 29 Aug 02:26 next collapse

For smaller folders I like using syncthing, that way it’s like having multiple updated backups

henfredemars@infosec.pub on 29 Aug 02:45 next collapse

I like this solution because I can have the need filled without a central server. I use old-fashioned offline backups for my low-churn, bulk data, and SyncThing for everything else to be eventually consistent everywhere.

If my data was big enough so as to require dedicated storage though, I’d probably go with TrueNAS.

486@lemmy.world on 29 Aug 07:13 collapse

Syncthing is neat, but you shouldn’t consider it to be a backup solution. If you accidentally delete or modify a file on one machine, it’ll happily propagate that change to all other machines.

addie@feddit.uk on 29 Aug 13:45 collapse

You can turn off “delete”, but modification is a danger, it’s true.

Turning off delete makes it excellent for eg. backing up photographs on your phone. I’ve got it doing this from my Android to my raspberry pi, which puts them on my NAS for me. Saves losing all my pictures if I lose my phone.

graycube@lemmy.world on 29 Aug 02:28 next collapse

I’d use an s3 bucket with s3fs. Since you want to host it yourself, Minio is the open-source tool to use instead of s3.

graycube@lemmy.world on 29 Aug 02:31 next collapse

Oh, and if you want to use it as the backing store for a database consider obstore instead of s3fs: developmentseed.org/blog/2025-08-01-obstore/

panda_abyss@lemmy.ca on 29 Aug 03:54 collapse

I hear good things about seaweedfs instead of minio these days

Brkdncr@lemmy.world on 29 Aug 02:29 next collapse

LAN or internet?

Https is king for internet protocols.

BonkTheAnnoyed@lemmy.blahaj.zone on 29 Aug 02:34 collapse

LAN only. I may set up a VPN connection one day but it’s not currently a priority. (edited post to reflect)

Brkdncr@lemmy.world on 29 Aug 03:43 collapse

NFS works, but http was designed for shitty internet. Keep that in mind. Owncloud or similar might be a good idea.

renegadespork@lemmy.jelliefrontier.net on 29 Aug 02:37 next collapse

If you already know NFS and it works for you, why change it? As long as you’re keeping it between Linux machines on the LAN, I see nothing wrong with NFS.

Hawke@lemmy.world on 29 Aug 04:13 collapse

Isn’t nfs pretty much completely insecure unless you turn on nfs4 with Kerberos? The fact that that is such a pain in the ass is what keeps me from it. It is fine for read-only though.

undefined@lemmy.hogru.ch on 29 Aug 04:32 next collapse

If you’ve got Tailscale it’ll build WireGuard tunnels directly over the LAN: I actually do this with Samba for Time Machine backups on macOS.

Obviously the big bonus is being able to do the same over the internet without the gaping security holes.

(I used to use split DNS so that my LAN’s router’s DNS server returned the LAN IP, and Tailscale’s DNS server returned the Tailscale IP. But because I’m a privacy geek I decided to make it Tailscale-only.)

Appoxo@lemmy.dbzer0.com on 29 Aug 06:26 next collapse

Would be fine for designated storage networks that use IP whitelists.
Other than that, you kind of need user specific encryption/segregation (which I beliege Kerberos does?)

nesc@lemmy.cafe on 29 Aug 07:08 collapse

It is, but nfsv3 is extremely easy to configure. You need to edit 1 line in 1 file and it’s ready to go.

RedEyeFlightControl@lemmy.world on 29 Aug 02:40 next collapse

TrueNas is pretty top notch and offers a variety of storage and protocol options. If you’re at all familiar with Linux style OS, it should be pretty easy to work with. Setting up storage comes with a little bit of a learning curve, but it’s not too bad. This SAN/NAS OS is polished, performant, and extensible. If you’re not planning on using SMB or Samba, you can most certainly use NFS, or iSCSI if that’s your thing.

velxundussa@sh.itjust.works on 29 Aug 02:54 next collapse

For linux only, lan only shared drive NFS is probably the easiest you’ll get, it’s made for that usecase.

If you want more of a dropbox/onedrive/google drive experience, Syncthing is really cool too, but that’s a whole other architecture qhere you have an actual copy on all machines.

9tr6gyp3@lemmy.world on 29 Aug 03:26 next collapse

Check out SyncThing, which can sync a folder of your choice across all 3 devices

[edit] oops, just saw you don’t plan on using it

In that case, if you use KDE, you can use Dolphin to set up network drives to your local network machines through SSH

Max_P@lemmy.max-p.me on 29 Aug 03:39 next collapse

For all its flaws and mess, NFS is still pretty good and used in production.

I still use NFS to file share to my VMs because it still significantly outperforms virtiofs, and obviously network is a local bridge so latency is non-existent.

The thing with rsync is that it’s designed to quickly compute the least amount of data transfer to sync over a remote (possibly high latency) link. So when it comes to backups, it’s literally designed to do that easily.

The only cool new alternative I can think of is, use btrfs or ZFS and btrfs/zfs send | ssh backup btrfs/zfs recv which is the most efficient and reliable way to backup, because the filesystem is aware of exactly what changed and can send exactly that set of changes. And obviously all special attributes are carried over, hardlinks, ACLs, SELinux contexts, etc.

The problem with backups over any kind of network share is that if you’re gonna use rsync anyway, the latency will be horrible and take forever.

Of course you can also mix multiple things: rsync laptop to server periodically, then mount the server’s backup directory locally so you can easily browse and access older stuff.

loweffortname@lemmy.blahaj.zone on 29 Aug 04:28 next collapse

I think a reasonable quorum already said this, but NFS is still good. My only complaint is it isn’t quite as user-mountable as some other systems.

So…I know you said no SAMBA, but SAMBA 4 really isn’t bad any more. At least, not nearly as shit as it was.

If you want a easily mountable filesystem for users (e.g. network discovery/etc.) it’s pretty tolerable.

3dcadmin@lemmy.relayeasy.com on 29 Aug 05:10 next collapse

I still have to use SAMBA as Win 11 hates NFS with a passion and we have Win 11 boxes here supplied as work machines so no changing. Also wifeys gaming rig is Windows as she don’t want to mess around getting stuff to work…
But hey - for everything else it is NFS with all of its weirdness, but it just works a bit better than SMB

MudMan@fedia.io on 29 Aug 05:59 collapse

My Windows machines seem to be just fine with the couple of NFS shares I use for easier cross-platform mounting on boot. It comes at the cost of some security, though, so I use it to share unimportant stuff I want to mount very freely, like some media libraries. I use SMB for the rest.

I'm curious, what's the issue with NFS on Windows for you?

3dcadmin@lemmy.relayeasy.com on 29 Aug 08:23 collapse

Oh it just doesn’t like it as much as SMB… has work mandated VPN on it for starters! I use a truenas box for most of the backups etc. and I just share the same dataset via SMB and NFS and locally only, so it is sorted, but NFS on the Win 11 box is just way flakier and drops often

talkingpumpkin@lemmy.world on 29 Aug 06:56 next collapse

If it’s for backup, zfs and btrfs can send incremental diffs quite efficiently (but of course you’ll have to use those on both ends).

Otherwise, both NFS and SMB are certainly viable.

I tried both but TBH I ended up just using SSHFS because I don’t care about becoming and NFS/SMB admin.

NFS and SMB are easy enough to setup, but then when you try to do user-level authentication… they aren’t as easy anymore.

Since I’m already managing SSH keys all over my machines, I feel like SSHFS makes much more sense for me.

possiblylinux127@lemmy.zip on 30 Aug 19:04 collapse

I think ZFS send/receive requires root which can be an issue for security

frezik@lemmy.blahaj.zone on 29 Aug 09:37 next collapse

Everyone forgets about WebDAV.

It’s a little jank, but it does work on Windows. If you copy a file in, it doesn’t show up in the file manager until you refresh. But it works.

It’s also multithreaded, which isn’t the case for SMB. This is especially good if you host it on SSDs.

possiblylinux127@lemmy.zip on 30 Aug 19:03 collapse

What do you mean SMB isn’t multithreaded?

Samba has been multithreaded for a long time

frezik@lemmy.blahaj.zone on 30 Aug 19:49 collapse

The connections aren’t. This didn’t matter much for spinning platters, but it does for SSDs.

hexagonwin@lemmy.sdf.org on 29 Aug 10:07 next collapse

I use both samba and NFS (with freebsd) on the same disk for my freebsd, linux and win7 desktop machine. All works perfectly fine.

I’m running an rsync daemon for large transfers and use copyparty for easily grabbing files on phones etc.

HelloRoot@lemy.lol on 29 Aug 10:32 next collapse

I have SFTPgo in a docker container with attached storage. Can access it through many protocols, but on linux I mount it via WebDav.

Whats neat is that I can also share files/folders with either other registered users or with a password or download only link and it has a web gui for that.

MangoPenguin@lemmy.blahaj.zone on 29 Aug 12:29 next collapse

Sounds like NFS might still be the way to go for you.

For backups personally I use Restic and connect over SFTP via SSH, since that’s just built in and doesn’t need any configuration.

For more traditional file sharing I use WebDAV with SFTPGo, since I need windows and android compatibility too, and webdav is pretty easy to setup and use.

And I also use Syncthing for keeping some directories in sync between devices.

zod000@lemmy.dbzer0.com on 29 Aug 13:46 next collapse

The fact that you say using NFS makes you old makes me feel like fucking Yoda

BonkTheAnnoyed@lemmy.blahaj.zone on 29 Aug 14:03 collapse

I can’t decide if I’m happy or disappointed that no one suggested I make a Beyowolf cluster.

zod000@lemmy.dbzer0.com on 29 Aug 15:04 next collapse

haha that really brings me back.

lambalicious@lemmy.sdf.org on 29 Aug 16:48 collapse

You intendeth to mean Beowulf? I would mayhaps have seen one ere the break of my college time. Wouldst you tell me more about it?

irotsoma@lemmy.blahaj.zone on 29 Aug 13:54 next collapse

NFS is really good inside a LAN, just use 4.x (preferably 4.2) which is quite a bit better than 2.x/3.x. It makes file sharing super easy, does good caching and efficient sync. I use it for almost all of my Docker and Kubernetes clusters to allow files to be hosted on a NAS and sync the files among the cluster. NFS is great at keeping servers on a LAN or tight WAN in sync in near real time.

What it isn’t is a backup system or a periodic sync application and it’s often when people try to use it that way that they get frustrated. It isn’t going to be as efficient in the cloud if the servers are widely spaced across the internet. Sync things to a central location like a NAS with NFS and then backups or syncs across wider WANs and the internet should be done with other tech that is better with periodic, larger, slower transactions for applications that can tolerate being out of sync for short periods.

The only real problem I often see in the real world is Windows and Samba (sometimes referred to as CIFS) shares trying to sync the same files as NFS shares because Windows doesn’t support NFS out of the box and so file locking doesn’t work properly. Samba/CIFS has some advantages like user authentication tied to active directory out of the box as well as working out of the box on Windows (although older windows doesn’t support versions of Samba that are secure), so if I need to give a user access to log into a share from within a LAN (or over VPN) from any device to manually pull files, I use that instead. But for my own machines I just set up NFS clients to sync.

One caveat is if you’re using this for workstations or other devices that frequently reboot and/or need to be used offline from the LAN. Either don’t mount the shares on boot, or take the time to set it up properly. By default I see a lot of people get frustrated that it takes a long time to boot because the mount is set as a prerequisite for completing the boot with the way some guides tell you to set it up. It’s not an NFS issue; it’s more of a grub and systemd (or most equivalents) being a pain to configure properly and boot systems making the default assumption that a mount that’s configured on boot is necessary for the boot to complete.

BonkTheAnnoyed@lemmy.blahaj.zone on 29 Aug 13:58 collapse

Thanks for that caveat. I could definitely see myself falling into that

irotsoma@lemmy.blahaj.zone on 29 Aug 15:28 collapse

Yeah, it’s easy enough to configure it properly, I have it set up on all of my servers and my laptop to treat it as a network mount, not a local one, and to try to connect on boot, but not require it. But it took me a while to understand what it was doing to even look for a solution. So, hopefully that saves you time. 🙂

Treczoks@lemmy.world on 29 Aug 15:08 next collapse

Stick with NFS, and use e.g. rsync for backup. Or subversion, if you want to be super-safe.

billwashere@lemmy.world on 29 Aug 15:17 next collapse

NFS is still useful. We use it in production systems now. If it ain’t broke, don’t fix it.

And if you have a dedicated system for this, I’d look into TrueNAS Scale.

CucumberFetish@lemmy.dbzer0.com on 29 Aug 20:28 collapse

Truenas Scale works well as long as you don’t want any dockers on it. Once you want to run docker images it is easier to install a VM on Truenas and run the docker from there than it is to try to set up custom “Apps”

deltapi@lemmy.world on 30 Aug 02:21 collapse

Wut? I’ve got a bunch of dockerhub images running on a scale box

CucumberFetish@lemmy.dbzer0.com on 30 Aug 06:18 collapse

It is doable, but it is a pain if the docker requires any special config like permanent storage. Getting nginx up and running for mTLS was especially annoying

maus@sh.itjust.works on 29 Aug 15:23 next collapse

NFS is still the standard. Were slowly seeing better adoption of VFS for things like supervisors.

Otherwise something like SFTPgo or Copyparty if you want a solution that supports pretty much every protocol.

possiblylinux127@lemmy.zip on 30 Aug 19:00 collapse

I would say SMB is more the standard. It is natively supported in Linux and works a bit better for file shares.

NFS is better for server style workloads

lka1988@lemmy.dbzer0.com on 29 Aug 22:36 next collapse

I use NFS for linking VMs and Docker containers to my file server. Haven’t tried it for desktop usage, but I imagine it would work similarly.

danhab99@programming.dev on 30 Aug 01:12 next collapse

I still use sshfs. I can’t be bothered to set up anything else I just want something that works out of the box.

BonkTheAnnoyed@lemmy.blahaj.zone on 30 Aug 02:21 next collapse

I like the sound of that!

However it looks like has a lot of potential for a ‘xz’ style exploit injection, so I’ll probably skip it.

From the project’s README.md : The current maintainer continues to apply pull requests and makes regular releases, but unfortunately has no capacity to do any development beyond addressing high-impact issues. When reporting bugs, please understand that unless you are including a pull request or are reporting a critical issue, you will probably not get a response.

danhab99@programming.dev on 30 Aug 05:51 collapse

I am 100% open to exploring other equally zero effort alternatives if only I had the time CURSE being an adult (ノಠ益ಠ)ノ . Is there anything better I should use, hopefully using existing ssh keys please.

interdimensionalmeme@lemmy.ml on 30 Aug 03:24 collapse

Isn’t that super clunky ? I keep getting all kind of sluggishness, hangs and the occasional error every time I use that. It ends up working but wow, does it suck.

I mostly use samba / cifs clients and it’s fast and reliable with properly setup dns and using only the dns or IP address, not smbios or active directory those are overkill

herseycokguzelolacak@lemmy.ml on 30 Aug 17:40 next collapse

I use a samba mount behind a VPN.

possiblylinux127@lemmy.zip on 30 Aug 18:58 collapse

You should take a look at webDAV

possiblylinux127@lemmy.zip on 30 Aug 18:56 next collapse

Samba or some sort of cloud like sync system like Sync thing or Nextcloud

prettybunnys@sh.itjust.works on 31 Aug 00:43 collapse

NFS is pretty good