linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lee <longinus00@gmail.com>
To: "Brian J. Murrell" <brian@interlinx.bc.ca>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: filesystem full when it's not?  out of inodes?  huh?
Date: Sun, 26 Feb 2012 12:25:19 -0800	[thread overview]
Message-ID: <4F4A952F.6010203@gmail.com> (raw)
In-Reply-To: <jie3b2$v5d$1@dough.gmane.org>

On 02/26/2012 12:05 PM, Brian J. Murrell wrote:
> On 12-02-26 02:52 PM, Daniel Lee wrote:
>> What's mysterious about that?
> What's mysterious about needing to grow the filesystem to over 20GB to
> unpack 10MB of (small, so yes, many) files?
>> When you shrink it btrfs is going to throw
>> away unused data to cram it all in the requested space and you had empty
>> space that was taken up by the metadata allocation.
> The shrinking is secondary mystery.  It's the need for more than 20GB of
> space for less than 3GB of files that's the major mystery.
Several people in this list have already answered this question but here
goes.

Btrfs isn't like other more common filesystems where metadata is fixed
at filesystem creation. Rather, metadata allocations happen just like
data allocations do. Btrfs also tries to allocate metadata in big chunks
so it doesn't get fragmented and lead to slowdowns when doing something
like running du on the root folder. The downside to all of this is that
it's not very friendly to "small" filesystems, in your case it allocated
some 1.8 GB of metadata of which only 500 MB was actually in use.

In the future you can create your filesystem with metadata=single to
free up more space for regular data or look into forcing the mixed block
groups mode which is normally only enabled for 1GB or smaller
filesystems. Mixed block group mode can't be switched off so you could
make a really tiny FS, several hunder MB or so, and then just grow it to
whatever size you want. The btrfs wiki seems to define small filesystems
as anything under 16GB so might be a good lower bound for actually using
btrfs in a day to day environment.



      reply	other threads:[~2012-02-26 20:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26  1:55 filesystem full when it's not? out of inodes? huh? Brian J. Murrell
2012-02-26  2:10 ` Fahrzin Hemmati
2012-02-26  2:16   ` Brian J. Murrell
2012-02-26  2:37     ` Fahrzin Hemmati
2012-02-26  3:57       ` Brian J. Murrell
2012-02-26  4:05         ` Fahrzin Hemmati
2012-03-09 22:02           ` Johannes Hirte
2012-02-26  8:52       ` Duncan
2012-02-26  9:10         ` Helmut Hullen
2012-02-26  9:41           ` Duncan
2012-03-03 10:25         ` Chris Samuel
2012-02-26  5:45   ` Brian J. Murrell
2012-02-26  5:50     ` Fahrzin Hemmati
2012-02-26  6:14     ` Brian J. Murrell
2012-02-26  7:19       ` Jérôme Poulin
2012-02-26 19:43         ` Brian J. Murrell
2012-02-26 11:00   ` Hugo Mills
2012-03-02 11:50     ` Brian J. Murrell
2012-03-02 12:23       ` Fajar A. Nugraha
2012-02-26 19:37 ` Daniel Lee
2012-02-26 19:48   ` Brian J. Murrell
2012-02-26 19:52     ` Daniel Lee
2012-02-26 20:05       ` Brian J. Murrell
2012-02-26 20:25         ` Daniel Lee [this message]

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=4F4A952F.6010203@gmail.com \
    --to=longinus00@gmail.com \
    --cc=brian@interlinx.bc.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).