2

My scenario is two servers in a hot-standby setup using ZFS to host VMs and using ZFS incremental snapshots for replication of changes to the VMs from one server to the other using something like zrep on a regular basis. Not sure what that basis is currently, might be something slow like every some minutes.

I would like to know what the incremental difference between two snapshots actually is: ZFS is copy-on-write in a way that overwriting exactly the same data in a file always leads to the new data being copied into free storage and linked into the changed file. From my understanding, if that happens multiple times between two snapshots, the difference between those two snapshots actually is only the most recent change to the same data. So in a file with 50 GB of data, if 3 times the exact same 20 GB of data gets written, the amount of difference from snapshots before and after those 3 changes is exactly the most recent 20 GB of data written only. The former 2 writes of 20 GB are simply lost and that's OK of course, because else I would have needed to create additional snapshots.

So while actually 60 GB of changes were written to the discs over time, the difference between the both snapshots is only 20 GB and only those are transferred using send and receive of snapshots over the network.

Is that correct or am I wrong?

1

Got an answer from Stefan Ring on some mailing list, so until the author makes some attempt to post it here and get his credits, I will publish it for reference:

It behaves like you expect. Incremental sends are more or less the same size as the sum of the "written" properties of the sent snapshots. You can check the size estimate easily with zfs send -n. In my experience, this estimate is exactly the resulting size.

http://list.zfsonlinux.org/pipermail/zfs-discuss/2017-August/029033.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.