There are 2 different problems here, and each has different mechanics and different fixes.

#1. when the volume is actually full and reports 100% usage (in df) – error message below in red

#2. when the volume is not full, but says its out of space – error message below in red

Note if the console/terminal doesnt show the error. dmesg output will show it

#1. When the volume is actually full and reports 100% usage (in df)

BTRFS doesnt allow to mount Read/Write if its 100% full. But you can mount it as read only, to find which files are filling it up. Well whats the use if you cant get rid of them (deleting is still writing)?

dmesg will say things like this

BTRFS error (device md0) in __btrfs_free_extent:5561: errno=-28 No space left. btrfs is forced readonly.

Well actually there is a way to mount as read/write, 2 ways (and 1 way which is kind of a hassle). 1 common way and 1 mysterious way that I found.

FIX1 – Common way:

UPDATE 2015-12-03: Read up about running the above command differently now

 FIX2 – My mysterious way:

NOTE: if anyone can explain why FIX2 works then your here by declared smart and awesome

After mounting read write: Delete your big files, And do a balance (with a small dusage value that you increment, doing it with increments allows for more thourough and faster completion time)

#2. When metadata full but data not full

Here the problem is the volume mounts as read write (so normal mount works), however any writes or changes bring up the error in red below.

BTRFS writes data into chunks of 3 categories (data, metadata and system), it therefor has the con of having to do allocation. The allocation algorithm might be off and not give enough space for data, and favor more metadata. This error could arise: In reality there will be space left but the device will report no space left (this is unlike the above problem #1 where in #1 there was actually no space left).

NOTE: This article of mine explains allocation (and this problem more in detail towards the bottom of the article):

NOTE: Below article covers this problem as well:

To fix this problem you just need to do a balance.

Now if you get the error:

ERROR: error during balancing ‘/data/’ – No space left on device

Then you will need to clear up space (maybe using the above method), or what if you dont want to clear up space (Because after all you should have that free space allocated for use), then you can use the following trick.

Add a device to the btrfs volume. Then Balance it. Then remove the device.

Leave a Reply

Your email address will not be published. Required fields are marked *