From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Hugo Mills <hugo@carfax.org.uk>, <linux-btrfs.tebulin@xoxy.net>,
<linux-btrfs@vger.kernel.org>
Subject: Re: Kernel 3.19 and still "disk full" even though 'btrfs fi df" reports enough room left?
Date: Thu, 19 Nov 2015 08:42:13 +0800 [thread overview]
Message-ID: <564D1AE5.3000700@cn.fujitsu.com> (raw)
In-Reply-To: <20151118190857.GY24333@carfax.org.uk>
Hugo Mills wrote on 2015/11/18 19:08 +0000:
> On Wed, Nov 18, 2015 at 07:53:03PM +0100, linux-btrfs.tebulin@xoxy.net wrote:
>> Hello there!
>>
>> I'm stumbling over this regularly. I explicitly upgraded the kernel to
>> avoid this, but it still occurs me every few months:
>>
>> $ touch foo
>> touch: »foo“ kann nicht berührt werden: Auf dem Gerät ist kein
>> Speicherplatz mehr verfügbar
>> $ sudo btrfs fi df /
>> Data, single: total=101.14GiB, used=78.99GiB
>> System, DUP: total=32.00MiB, used=16.00KiB
>> Metadata, DUP: total=9.00GiB, used=8.48GiB
>> unknown, single: total=512.00MiB, used=832.00KiB
>>
>> Whut? Why? WTF?
>
> Running out of metadata space, probably, although it's impossible
> to tell from only this information -- see below.
It's almost 100% sure that you already run out of metadata space.
Although the metadata output is showing that you still have about 512M
available, but the 512M is Global Reserved space, or the unknown one.
Global reserved space should not be used, until metadata is really
running out.
And in your case, you are already using global reserved space, see the
832KB?
You may question that why not continue using global reserved space, but
that's the last method, so Btrfs will just give you ENOSPC error.
The output is really a little confusing. I'd like the change the output
by adding global reserved into metadata used space and make it a sub
item for metadata.
This should make the output more understandable.
Thanks,
Qu
>
>> $ uname -a
>> Linux neptun 3.19.0-31-generic #36~14.04.1-Ubuntu SMP Thu Oct 8
>> 10:21:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>>
>> dmesg is empty. Resolution is to delete a whole bunch of btrfs
>> subvolumes which are produced by apt-btrfs-snapshot. I run a
>> sudo btrfs balance start -dusage=5 /
>> afterwards as part of my regular "i have no clue what the heck is wrong
>> with this; maybe it will help & mend my problem" process.
>>
>> This is annoying. Why is even btrfs own "disk free" utility lying to me?
>
> I't snot lying to you -- you're just not seeing the whole
> story. You can't tell everything about disk usage from btrfs fi df.
> You need to use btrfs fi show as well to get the full information (or
> btrfs fi usage, which combines the output of both). See the FAQ[1] for
> how to interpret the output.
>
>> How to fix this? How to avoid this? How to get notified about this?
>
> Without seeing your btrfs fi show output, I can't say for sure, but
> the usual problem in this instance is that you've got all your
> available space allocated to either data or metadata, and the FS needs
> more metadata space and can't allocate it. The solution is to free up
> some of the data allocation, using a filtered balance. See the FAQ[2]
> for how to spot the problem, and what to do about it.
>
> [1] https://btrfs.wiki.kernel.org/index.php/FAQ#Understanding_free_space.2C_using_the_original_tools
> [2] https://btrfs.wiki.kernel.org/index.php/FAQ#if_your_device_is_large_.28.3E16GiB.29
>
> Hugo.
>
>> - Ben
>>
>> P.S.: Just as user feedback: For /srv I'm using on the very same system
>> ZFS since the very first day. With snapshots & all the fancy stuff like
>> ZRAID-1, lz4, ... My number of Issues there: 0
>>
>
next prev parent reply other threads:[~2015-11-19 0:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 18:53 Kernel 3.19 and still "disk full" even though 'btrfs fi df" reports enough room left? linux-btrfs.tebulin
2015-11-18 19:08 ` Hugo Mills
2015-11-19 0:42 ` Qu Wenruo [this message]
2015-11-19 2:16 ` Duncan
2015-11-20 11:39 ` Dmitry Katsubo
2015-11-20 13:21 ` Austin S Hemmelgarn
2015-11-20 13:27 ` Hugo Mills
2015-11-20 13:52 ` Austin S Hemmelgarn
2015-11-20 16:39 ` Dmitry Katsubo
2015-11-19 17:35 ` linux-btrfs.tebulin
2015-11-19 18:28 ` Hugo Mills
2015-11-19 18:45 ` linux-btrfs.tebulin
2015-11-19 18:56 ` linux-btrfs.tebulin
2015-11-19 19:26 ` linux-btrfs.tebulin
2015-11-20 3:14 ` Duncan
2015-11-20 9:38 ` linux-btrfs.tebulin
2015-11-20 10:44 ` Duncan
2015-11-20 14:25 ` Dmitry Katsubo
2015-11-19 20:18 ` Austin S Hemmelgarn
2015-11-19 5:58 ` Roman Mamedov
2015-11-19 8:31 ` Patrik Lundquist
2015-11-19 12:28 ` Austin S Hemmelgarn
2015-11-20 2:11 ` Duncan
2015-11-20 13:13 ` Austin S Hemmelgarn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564D1AE5.3000700@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs.tebulin@xoxy.net \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.