What command to defragment BTRFS partition using zlib maximum compression?

Using the command below
sudo btrfs filesystem defragment -v -r -czlib -f /
defragment an BTRFS partition root using compression zlib.
In fstab is possible select zlib compression 1 to 9.
Strange detail is that defrag command allow to select zlib, but not has any information if is possible select low or high compression.
Trying to use czlib:9 or c zlib:9 result in error and not will run the command.
If using defrag command will use zlib compression settings from fstab ? will use maximum compression ? If not how is possible configure to use maximum compression ?

Thanks for reply.

Another AskUbuntu cross post with no particular specificity to Lubuntu, so closing.

What I can tell you according to the upstream documentation is that 3 is the default level for zlib and it’s not possible to turn off compression. Reading between the lines, it seems that remounting the volume with the appropriate compression option will result in the volume being compressed, but I"m not a BTRFS expert.

1 Like