I converted my ext4 partition to btrfs and deleted the save subvolume after doing so. Then I enabled the compression (lzo) of the filessystem in the fstab file and everything is correct so far.

Then I forced the compression of all files using the defragmentation command with the parameter -c that the new compression is applied to all files.

While doing so, I noticed that my ssd got completly filled up - before I had 6gigs of free space. No I got nothing left.

easteregg@x201s:~$ btrfs fi df /
Data: total=50.00GB, used=49.17GB
System: total=32.00MB, used=4.00KB
Metadata: total=24.50GB, used=9.86GB


easteregg@x201s:~$ df -ha
Filesystem        Size  Used Avail Use% Mounted on
/dev/sda1          75G   60G  852M  99% /

So now. How can I regain my free space. I expected to gain more space because of the lzo compression. And now!

The fs is correctly mounted.

easteregg@x201s:~$ mount
/dev/sda1 on / type btrfs (rw,noatime,ssd,compress=lzo)

Any ideas how to fix this issue?

  • I now have got the point: you can't do online re-balancing. That explains why nothing worked for me. So I just booted up my rescue system and just did a re-balance of the whole disk and afterwards I carried out the defragmentation command with compression enabled. Now I have got about 17 gigs of free space! nice :)
    – easteregg
    Commented Jul 31, 2012 at 21:59
  • 1
    As a best practice, only keep a minimal set of snapshots and remove unnecessary ones to avoid wasting of space on the volume, because btrfs is copy-on-write file system, as time goes on, more and more data blocks will be changed, thus making snapshots occupying more and more space on the disk.
    – Terry Wang
    Commented Nov 6, 2012 at 4:46
  • 2
    See also this question, which has a thorough explanation and useful comments.
    – ignis
    Commented May 11, 2014 at 8:05

2 Answers 2


I know this question is old - but as of today the balance command solves this stuff:

During conversion a lot of space will be allcoated to move stuff to it. Once it is allocated, it will not show up as "free" or "unallocated" anymore. To fix this simply start a balance

btrfs balance start "path"

you can also tell the balance command, to only balance chunks, which are used for acertain percentage - like 0% which would mean the chunks are empty:

btrfs balance start "path" -dusage=0 -musage=0

parameter -d means options for the data. parameter -m means options for the metadata.

play with the balance command, it should help.

  • 2
    For an old response, to an even older question, this saved me today. Thank you.
    – Dave
    Commented Sep 5, 2020 at 3:47

Look at the output from btrfs fi df:

Data: total=50.00GB, used=49.17GB
System: total=32.00MB, used=4.00KB
Metadata: total=24.50GB, used=9.86GB

The total part is the allocated space, while used is the actually used by btrfs. The difference between total and used (around 15 GB) is your missing space. As you can see, it has already been allocated for metadata blocks.

I only have hobby experience with btrfs, but I don't think a ext4 conversion is the best way to create a well laid out btrfs filesystem. Fortunately, you can rebalance the whole filesystem to make it re-do all allocations.

As always, use backups.


You must log in to answer this question.

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