linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kofler <michael.kofler@gmx.com>
To: linux-btrfs@vger.kernel.org
Subject: how to find out total capacity and raid level of btrfs file system
Date: Sat, 31 Jul 2010 13:59:35 +0200	[thread overview]
Message-ID: <4C541027.3020105@gmx.com> (raw)

I know df does not report the correct size for btrfs raid systems. Is 
there any other way to find out the total capacity of a btrfs file 
system? Or at least the raid level for data / metadata?

My test system is Ubuntu 10.10 alpha with btrfs 0.19 and a 2.6.35 kernel 
(don't know which rc).

# uname -a
Linux ubuntu 2.6.35-12-generic #17-Ubuntu SMP Mon Jul 26 18:48:06 UTC 
2010 x86_64 GNU/Linux


I created a raid1 system consisting of two 8GB devices (so total 
capacity would be 8 GB for system + metadata + data)

# mkfs.btrfs -d raid1 -m raid1 /dev/sdb1 /dev/sdc1
# mount /dev/sdb1 /media/btrfs

Now I gather all information I can with btrfs:

# btrfs filesystem show /dev/sdb1
Label: none  uuid: dc691a5d-187e-4cb4-a94a-d12dabdffde4
	Total devices 2 FS bytes used 28.00KB
	devid    1 size 8.00GB used 2.03GB path /dev/sdb1
	devid    2 size 8.00GB used 2.01GB path /dev/sdc1
# btrfs filesystem df /media/btrfs/
Data:     total=1.01GB, used=0.00
Metadata: total=1.01GB, used=24.00KB
System:   total=12.00MB, used=4.00KB

Is there a way to find out how devid 1 and devid 2 are used (i.e. which 
raid level)?

Is there a btrfs command to get the total capacity of my filesystem? (In 
my case, it should report total 8 GB, of which 2.03 GB have already been 
claimed for data + metadata, another 5.97 GB are free. It might also say 
6,97 GB for data are still available.)

Thank you,


	Michael Kofler

                 reply	other threads:[~2010-07-31 11:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4C541027.3020105@gmx.com \
    --to=michael.kofler@gmx.com \
    --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).