I am trying to find a way to display how many blocks a snapshot refers to “uniquely”. Then, I want to find to which files those blocks pertain.
Goal is to manually inspect if a file was (potentially inadvertently) altered, and if so, find which version I really want to keep.
Background for the question:
As a baseline, I’ve read Jim’s space accounting article. But apparently I am not understanding a few things.
I know there is zfs list -t snapshots <filesystem>
and that displays USED
and REFER
columns. Over time, if I am solely adding new files to a dataset, the REFER
column should have a monotonically growing number, and REFER
should say 0B
for the entire snapshot history of the dataset. However, without (knowingly) altering files, some of my datasets’ snapshot histories will have a non-zero value sprinkled in a few times on the USED
column.
This might be access times, and I have at some point set atime=off
on all my datasets. (But I didn’t document when that was, so I can’t test if that is the cause, to see if I am getting 0B
always in the USED
column since.)
When I zfs diff
the non-zero USED
snapshot with the snapshot immediately {prior | post}, the diff returns empty, and I get a new prompt.
So I am wondering if there is a way to print a delta REFER
column, so tiny changes don’t get swallowed up in rounding of the reported REFER
column, as related in the third to last paragraph of the “One Block, Many Snapshots” section of the linked article.