according to https://btrfs.wiki.kernel.org/index.php/Compression#How_do_I_enable_compression.3F there exist a "NOCOMPRESS" flag, how do i set the NOCOMPRESS flag on a file?

2 Answers 2


you could certainly have stolen my answer for yourself :)

the easiest is btrfs property set $THING compression none and a defrag to uncompress it. using btrfs property to set the +c force-compression flag is the most flexible, as you can specify a compression type to force, where using chattr it defaults to using zlib.

  • he's asking about setting NOCOMPRESS and you reply +c which is about setting compression, not unsetting ut
    – poige
    Commented Feb 4, 2021 at 3:19

You're probably looking for chattr +m 'FILE'

m A file with the 'm' attribute is excluded from compression on file systems that support per-file compression.

The +c option mentioned by @Andrew Keech is the opposite.

Note, however, that there are mount options in btrfs that will disregard the NOCOMPRESS flag, as mentioned in the docs you provided.

You must log in to answer this question.

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