I recently migrated my FreeNAS to Ubuntu 18.04 LTS with ZFS on Linux (ZoL) v0.7.5 and I have been working with the zfs/zpool commands directly instead of through a GUI. I have a cron script set up to take snapshots the datasets I care about hourly. I also have a “scratch” dataset that does not have snapshots taken. Occasionally, I move data from the scratch dataset to a different dataset on the same zpool, but that does not seem to impact the “used” value on the snapshots.
To confirm this, I copied a 1GB file to my documents dataset from the scratch dataset, waited for the hour to pass, and then checked the snapshots that are using more than 0B. My documents folder isn’t changed much, so there aren’t too many too list.
$ zfs list -r -t snapshot -o name,used tank/documents | grep -v 0B
Nothing in that output is even close to the 1GB I was expecting. I also tried manually creating a snapshot after the 1GB file was copied to ensure it’s not a quirk with the script, but it’s the same result. Can anyone explain this? Maybe @wendell?