Could not boot due to brfs no-space condition. How should I keep using BTRFS?

I do use btrfs since years(at least 2015/16). I had to do this once. I did not lose any snapshot or any data.

The right way to “escape from jail”, is to:

  • add a partition (for example a extern USB-Stick with 8GB) to the btrfs-volume with btrfs devive add
  • From now on this usb-partition belongs to your volume! NEVER boot without it. I suggest to not reboot at all in this stage! This stick has to stay until btrfs device remove has completed.
  • now delete some stuff you do not need until your disk will be not more then 90% full
  • if there are old snapshots you don´t need, delete them now

Do not get confused if btrfs does not immediately display the vacant space. After the next step (balance) it becomes visible.

  • balance btrfs with a filter(!)
  • remove the added partition from the volume with btrfs device remove This will take some time ! Do not reboot until this step is complete.
  • Now you may remove the USB-Stick.

Now you are out of jail. Stay out !

  • Think about how to extend the btrfs volume to double size
  • seek if there is a program filling your disk
  • look for snapshots !
  • don’t forget to remove old snapshots (best done automatically)

please have a look at Btrfs - Manjaro

Balance will not prevent “out of space” !

This will only wear out your hard drive/ssd. Balance reads and writes every byte of your hard drive! It can shrink some space, but this is the wrong approach. If btrfs has enough space, an automatic defragmentation takes place. If there is not enough space, this can no longer work.

The right approach is:

When creating a btrfs volume, don’t be stingy on storage space. A btrfs volume should normally only be 80% full (mine is 46% with all snapshots included). Otherwise it is advisable to adjust the volume. In an emergency, 90% are ok too. But that’s not beneficial neither for the Btrfs volume nor for an SSD.

Your problem was:

Not the space used is the problem, but the space allocated. There is no space to breath for btrfs any more. And the disk is 85% Full. Dont´t do this with btrfs.

4 Likes