linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: jck <jck@archlinux.us>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Disk space usage displayed incorrectly?
Date: Mon, 12 Jul 2010 21:16:50 -0400	[thread overview]
Message-ID: <20100713011650.GN563@think> (raw)
In-Reply-To: <AANLkTil1adG5cmYxbjvzv7OygH9q12SyA2HL8bOWtuxp@mail.gmail.com>

On Sat, Jul 10, 2010 at 07:22:26AM +0530, jck wrote:
> Hello,
> when i check diskspace usage of a btrfs partition using df i get the
> wrong free space, this is expected i think.

We do try to take the raid levels into account during df, but only for
the space that is already allocated.

> However even when i use 'btrfs filesystem df' I get wrong freespace:
> Data: total=123.58GB, used=87.31GB
> Metadata: total=61.00GB, used=396.29MB
> System: total=32.00MB, used=16.00KB
> 
> Does this mean that after the 123 GB of 'Data' fills up I wont be able
> to add more stuff to the partition?
> I'm using btrfs-progs-git (jul 10)

This does reflect the space that is allocated, but the drive itself may
have more free space.  btrfs filesystem show will give you a few more
details.

Basically btrfs allocates from the drive in chunks of about 1GB and then
puts the file data or metadata into those chunks.  So if you do a mkfs
and then create one file, you might have 1TB of space on the drive that
hasn't been allocated yet.

-chris


  reply	other threads:[~2010-07-13  1:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-10  1:52 Disk space usage displayed incorrectly? jck
2010-07-13  1:16 ` Chris Mason [this message]
2010-07-13  1:53   ` jck
2010-07-13  4:02     ` jck
2010-07-13  5:17       ` jck
     [not found] <AANLkTinA2QCqlrGoRvUn_uAZ1NxPm65DksQQ9YBeHrqh@mail.gmail.com>
2010-07-10  1:42 ` jck

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=20100713011650.GN563@think \
    --to=chris.mason@oracle.com \
    --cc=jck@archlinux.us \
    --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).