I’ve read a lot of the documentation regarding the transparent compression on BTRFS and what can it do, but I cannot accurately know how much actual space I am using on my disk. Using du -sh /home or df -h or btrfs filesystem df return the same result of ~33gb used, but when using compsize /home I get 23G of usage and 30G uncompressed in the TOTAL row.

So, what I don’t understand:

  • What is the actual disk usage? Which tool is reporting the correct size?
  • Will something happen if I get the uncompressed size to the size of my partition, but not the compressed size? Will the OS not let me write anymore despite having enough space?

Solved: if i mount the / btrfs subvol: sudo mkdir /mnt/nvmeroot && mount -o subvol=/ /dev/nvme0n1p15 /mnt/nvmeroot and use compsize /mnt/nvmeroot/ on it it reports the same size as the last commands and shows me the effectiveness of compression.

  • Hupf@feddit.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 months ago

    I prefer to look at the Unallocated size in btrfs filesystem usage for an estimate of how much I can still write.

    Just make sure that never gets too low. Once btrfs can’t write a dirty metadata or system chunk, bad things will happen.