manifesto7473

joined 9 months ago
[โ€“] [email protected] 0 points 4 months ago

If I know correctly, defrag will always duplicate the reflink files.

https://btrfs.readthedocs.io/en/latest/Defragmentation.html

Defragmentation does not preserve extent sharing, e.g. files created by cp --reflink or existing on multiple snapshots. Due to that the data space consumption may increase.

[โ€“] [email protected] 0 points 4 months ago (3 children)

It is only for new data.

For example, you would have to defragment your filesystem again with btrfs filesystem defragment -r -v -czstd /. Where zstd is an algorithm and /, a root path. With this command, the default compression level will be used, which is level 3.

Be careful, defragmenting the btrfs file system will/can duplicate the data.

As for a mount point, if you decided to use zstd algorithm with level 1 compression, just add the compress=zstd:1 or compress-force=zstd:1 to the mount options (fstab or while mounting manually)