5

I have created a btrfs filesystem with compression, using the compress option in fstab and it seems to be working. I would quite like to try the higher level of compression. I can change this in fstab, but if I understand it this will affect only new files. I can also recompress with btrfs filesystem defragment. This allows me to set the algorithm but I can't see how to change the level.

Is there a way to achieve this? I was going to try zlib level 9.

2
  • why not try ZStd ?
    – dotbit
    Commented Oct 14, 2019 at 12:03
  • I don't know who to
    – Phil Lord
    Commented Oct 14, 2019 at 17:17

1 Answer 1

0

From btrfs-progs version 4.15 you can recompress with another compression level for zlib like this:

btrfs fi defrag -czlib:9 ...

For zstd compression level is supported from version 5.1.

See https://btrfs.wiki.kernel.org/index.php/Changelog

But be careful with defrag as it will unreference the snapshot structure of the btrfs filesystem, which might lead to a substantial increase in disk usage.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .