Enabling dedup

I got fast_dedup enabled, dedup property is on. Would that deduplicate of existing data, and if not, how can I force it?

No, existing data stays the same, not de-duplicated.

Ideally you start with a empty ZFS Dataset, enable fast_dedup & dedup property, then copy in the data.

The only way to get existing data to take on changed ZFS Dataset characteristics, (De-Dup, compression, different checksum), is to copy the files and remove the original.

One thing that can be important for De-Dup is the checksum algorithm. If you read the ZFS manual pages, some checksum algorithms are not recommended for De-Dup. It’s possible that the TrueNAS GUI takes that into account. But, because fast De-Dup is a new feature, you may want to verify what checksum algorithm is set on your De-Dup Datasets.

Please note that De-Dup, old or fast, is not perfect. Their are situations where it will not help much at all, and using compression makes more of a difference. (You can combine compression and De-Dup…) On the other hand, certain types of storage do benefit noticeably from De-Dup.

1 Like