this post was submitted on 19 Sep 2025
17 points (100.0% liked)

Linux Questions

3986 readers
17 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] Hupf@feddit.org 5 points 9 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.