Git produces a commit ID by hashing various components in such a way that we essentially get an identifier for the entire history of the project.
From my understanding ZFS hashes everything (data / metadata / filesystem structure), which presumably results in a single "top-level" hash at the root of the filesystem.
I was wondering if there was a way to get at such a hash or identifier from a ZFS filesystem or snapshot.
This could potentially be used to quickly and reliably confirm with decent confidence that "all the data in dataset-x matches all the data in dataset-y".
I don't have full understanding of the internals of zfs send
and zfs recv
, but I would presume that they deal with such concepts, ensuring that both the sending and receiving filesystems have a common starting point.
Edit: I have off-site backups which are automated using syncoid... If I were to look at the matching snapshot on each of the corresponding filesystems across the n-pools, I'd expect to see the same identifier.
It could also potentially be useful to see if there are any changes between snapshots of a dataset, though I suspect that the snapshot attributes (name, date, etc...) might affect this identifier, so it would be good to look "one level down" for this one.