ZFS and Syncthing: possible huge snapshots?

Hi All,

I’ve been watching the @LTS videos for a while, and either I was familiar with the subject and learned more through watching the videos, or I was not aware of a solution, and got a good introduction by watching the video.

With my new NAS/HomeServer (Yes, it’s going to be both. I have a small home and a small budget) I was persuaded to use ZFS for the storage part of things.
I think I will use ZFS-Send/Receive (if I am correct) to try and sync some stuff to a hp-microserver that will be running free/trunas.

Now I think Syncthing might be nice for syncing photos from my phone and data between desktop/laptops etc. but I read something, and would like to know how big of a problem this will be.

I read online that Syncthing doesn’t change the file on the remote location, but replaces it with every change, which makes for a big change from a ZFS-view which will result in bigger Snapshots.

Am I seeing problems where there are none?
Has anyone used this setup before? (Syncing stuff from a ZFS-drive to desktop/phone/laptop with Syncthing and zfs-replicating the fs to a remote free/truenas)

I look forward to your experience.

ZFS replication is just that, replicating data to another system via the block data level, not the file system level. Syncthing is a file synchronization tool and syncs on a per file basis. We use it on TrueNAS and it works great. I am not really clear at all on the question or what problem you are expecting.

The problem I fear came from this reddit: https://www.reddit.com/r/zfs/comments/eysk2n/excessive_snapshot_storage_usage_when_making/

with this reply as my trigger:

Unfortunately, syncthing doesn’t update the files in a way that’s friendly to the block-based replication that zfs does. Look at their documentation closely:

Syncthing never writes directly to a destination file. Instead all changes are made to a temporary copy which is then moved in place over the old version.

This method of updating is not compatible with efficient ZFS snapshotting. ZFS expects changes to files to be made directly to the destination file, and only the specific changes needed. Syncthing makes a full copy of the file being synced (with any updates applied), then makes a rename() system call to overwrite the old file with the newly updated file. Because ZFS is a copy-on-write filesystem, it follows the instructions of syncthing, makes an exact copy of all the data from the original file in the new temporary file, while leaving the original file in place as well. Since you have a snapshot referring the blocks in the old file, and you have the active mount referring to the blocks in the new file, you end up storing both.

I guess don’t use it if you are incrementally changing large files. Not something that I ever do.

Ok, I do not plan on making minor changes to huge files a lot, so I am going to play with Syncthing soon!

Thank you for your videos and replies!