Ubuntu – How to enable btrfs zstd compression

btrfscompressionlubuntu

I saw mention of zstd in the documentation (4.14 and later), so I figured to give it a try.

Starting from lubuntu 17.10, I upgraded my kernel to 4.15:

# uname -sr
Linux 4.15.0-041500-generic

However, neither man, nor btrfs commands acnowledge the fact that I'm now running a kernel supposedly capable of using this comression algorithm:

# btrfs filesystem defrag -czstd -rv .*
ERROR: unknown compression type zstd

What did I "forget" to upgrade?

Best Answer

You also need to update btrfs-progs to a version that supports zstd. Zstd support was initially added in version 4.13.