Hi all,

might be a simple question but I did not find a trustable source for this.

BTRFS uses COW which might lead to fragmentation.
So using "btrfs fi defrag -r /mnt" will bring most file extend in a row and copy previously deduplicated extends. Obviously this uses more disk space. This is not what I want, but I need to run "defrag" because I initially skipped the "compress=zstd" option when mounting. So many files are stored without compression. Therefor I neede to do the "defrag".

I am now unsure about the deduplication itself.  How does it work?
I create a file in a directory (ie on Monday). Some days later I create a file which has some extents with equal data. Does btrfs recon the equal extents and does it doe deduplication then? Or does it only do deduplication when ie "cp --reflink" is used?

However as I needed the compression and not the defragmentation is there any way to add compression and recreate deduplication later?

Sorry if this is a dumb question.

/KNEBB


Reply via email to