Disk usage and ZFS deduplication

Per von Zweigbergk pvz at itassistans.se
Tue Jun 14 07:19:37 UTC 2011

I've been following the "Impossible compression ratio on ZFS" thread with some interest, and it made me ask myself this:

Let us say we have a hypothetical zfs filesystem with the equally hypothetical files A and B. The filesystem has deduplication enabled. Both files have an apparent file size of 100 MB, but 50 MB of that data is common between the two files and thus can be deduplicated. This would mean that total disk usage would be 150 MB.

If you use "du" to determine disk size for a deduplication, what would be the result? Which file would the common data be accounted to? Or would it be accounted to both files somehow, in part or in full?

More information about the freebsd-fs mailing list