Re: btrfs thinks fs is full, though 11GB should be still free

Qu Wenruo
2023-12-11T23:54:20Z

On 2023/12/12 10:08, Christoph Anton Mitterer wrote:
> On Tue, 2023-12-12 at 09:50 +1030, Qu Wenruo wrote:
>> Shows exactly which subvolumes uses how many bytes, including orphan
>> ones which is pending for deletion.
>
> Well... here we go:
> # btrfs qgroup show .
> Qgroupid Referenced Exclusive Path
> -------- ---------- --------- ----
> 0/5 16.00KiB 16.00KiB <toplevel>
> 0/257 39.48GiB 39.48GiB data
> 0/258 16.00KiB 16.00KiB <stale>
> 0/259 16.00KiB 16.00KiB a
> 0/260 16.00KiB 16.00KiB b
> 1/100 32.00KiB 32.00KiB <0 member qgroups>
> 1/101 0.00B 0.00B <0 member qgroups>
>
> I've just created a and b to get qgroup (somehow? ^^) working.
>
>
> Nevertheless:
> I'm 100% sure, that before, there were never any subvolumes on that fs
> other than the toplevel and data, unless btrfs somehow creates/deletes
> them automatically.
>
>
> But the above output, AFAIU, still shows that "everything" is in data,
> while counting the bytes of files there, still yields a much lower
> number.

OK, then everything looks fine.

>
>
> And other ideas what I could test?

Then the last thing is extent bookends.

COW and small random writes can easily lead to extra space wasted by
extent bookends.

E.g. You write a 16M data extents, then over-write the tailing 8M, now
we have two data extents, the old 16M and the new 8M, wasting 8M space.

In that case, you can try defrag, but you still need to delete some data
first so that you can do defrag...

Thanks,
Qu
>
>
> Thanks,
> Chris.