Comment 8 for bug 1751517

Revision history for this message
Dmitriy Geels (dmig) wrote :

Seems that btrfs ignores compression attribute if compression was set using mount option.
So, the solution is to set compression attributes per-directory:

1) remove 'compress=zstd' from your fstab root record
2) sudo btrfs property set /boot compression lzo # ensure this dir will remain readable by grub
3) sudo btrfs filesystem defragment -vrclzo /boot # ensure /boot gets recompressed
4) for $d in bin etc lib lib64 opt sbin snap srv usr var; do sudo btrfs property set /$d compression zstd; done

Directory list is for Ubuntu 18, check and adjust for your own needs.