Re: btrfs filled up dm-thin and df%: shows 8.4TB of data used when I'm only using 10% of that.

Josef Bacik
2020-02-22T14:53:00Z

On 2/22/20 9:51 AM, Marc MERLIN wrote:
> On Fri, Feb 21, 2020 at 05:23:12PM -0800, Marc MERLIN wrote:
>> On Fri, Feb 21, 2020 at 05:06:37PM -0800, Marc MERLIN wrote:
>>> You asked for a check, it's running but may take a while:
>>> gargamel:~# btrfs check /dev/mapper/vgds2-ubuntu
>>> Checking filesystem on /dev/mapper/vgds2-ubuntu
>>> UUID: 905c90db-8081-4071-9c79-57328b8ac0d5
>>> checking extents
>>> checking free space cache
>>> checking fs roots
>>> checking only csum items (without verifying data)
>>>
>>> I'll paste the completion when it's done.
>>
>> Ok, faster than I thought. btrfs check came back clean
>> I added spaces for readability.
>> So this claims I'm using 9TB?
>>
>> Is it possible that I'm hitting this problem
>> 1) I did really fill the filesystem (well not to the filesystem size but
>> to the size that dm-thin was not able to give blocks anymore)
>> 2) I deleted/freed up the space
>> 3) btrfs needs space to free up the space, and there is no space left,
>> so it's unable to mark the free blocks, as free, and I'm therefore
>> stuck?
>>
>> found 9 255 703 285 760 bytes used, no error found
>> total csum bytes: 9 019 442 564
>> total tree bytes: 17 533 894 656
>> total fs tree bytes: 7 411 073 024
>> total extent tree bytes: 379 928 576
>> btree space waste bytes: 1 769 834 145
>> file data blocks allocated: 9267682025472
>> referenced 9272533270528
>
> Ok, last call before I delete this filesystem and recover my system to a
> working state. I don't need the filesystem fixed, it's fairly quick for
> me restore it, but obviously if there is any useful state in it for
> improving the code, that will be lost.
>
> I understand it's the weekend, if someone thinks I should wait until
> monday to give some other folks the chance to see/reply, let me know,
> and I'll keep my system down until monday.
>

Go ahead and blow it away, and I'll add "dm-thinp failure mode" to my list of
things to look into. Sorry Marc,

Josef