I got a question about ZFS snapshotting:
So, as far as I understand, when I take a snaphot of a ZFS dataset, the snapshot will be initially 0 bytes in size, because at the moment of creation, there is no difference in files between the dataset itself and the snapshot, right?
When I now delete a 1GB file in the live dataset, the live dataset becomes 1GB smaller and the snapshot becomes 1GB bigger because that file is now only referenced in the snapshot.
Now, if I have multiple snapshots from different time points (let's say 10, during all of which the 1GB file was present), after deleting the 1GB file ALL of the 10 snapshots will get 1GB bigger, right? However, I assume that they will only be shown as 1GB bigger but the actual blocks where the 1GB file was written are still only present on disk once, so the disk itself is only filled up with 1GB and all of the 10 snapshots are each referencing that 1GB, correct?
In other words: All 10 snapshots will show (in "zfs list -t snap" for example) that they are 1GB big, but all 10 together will only take up 1GB of actual space on the disk?
If that is the case: How does replication via syncoid factor into this? When I have a backup server that is pulling snapshots from my main server via syncoid and those snapshots on the main server become bigger (because files were deleted), will syncoid pull these changed snapshots again (or at least the delta of what changed), even though they were already pulled before?
If they ARE pulled again (or their delta): Will only the references be updated or will the snapshots pulled to the backup server then each contain the actual data of the deleted files? In other words: Will a deleted 1GB file lead to 1GB of space taken up on the BACKUP server as well, or will that take up 10GB (1GB per snapshot) on that machine?
Thanks in advance for any help!