2

When mounting a BTRFS filesystem with the compression option, BTRFS will selectively compress files depending on whether they are deemed compressible or not.

Does this same logic apply when defragmenting? Or does the following force compression?:

btrfs filesystem defragment -r -czstd /data
# btrfs version
btrfs-progs v4.19
dippynark
  • 327
  • 3
  • 11

1 Answers1

-1

From the BTRFS Wiki:

How can I recursively compress/uncompress a directory (including guessed/forced-compression)

Uset the btrfs filesystem defrag command, the option -r will process the files recursively in a directory. This is independent of the mount options compress or compress-force, and using the option -c you can set the compression algorithm.

Currently (v4.14), it's not possible to select "no compression", using the defrag command. This may change in the future.