All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <ashford@whisperpc.com>, <kreijack@inwind.it>
Cc: Shriramana Sharma <samjnaa@gmail.com>,
	Martin Steigerwald <martin@lichtvoll.de>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Why is the actual disk usage of btrfs considered unknowable?
Date: Mon, 8 Dec 2014 10:42:59 +0800	[thread overview]
Message-ID: <54851033.7010601@cn.fujitsu.com> (raw)
In-Reply-To: <73b1fa42cc61f5a843206a8164952f74.squirrel@webmail.wanet.net>


-------- Original Message --------
Subject: Re: Why is the actual disk usage of btrfs considered unknowable?
From: <ashford@whisperpc.com>
To: <kreijack@inwind.it>
Date: 2014年12月08日 08:12
> Goffredo,
>
>> So in case you have a raid1 filesystem on two disks; each disk has 300GB
>> free; which is the free space that you expected: 300GB or 600GB and why ?
> You should see 300GB free.  That's what you'll see with RAID-1 with a
> hardware RAID controller, and with MD RAID.  Why would you expect to see
> anything else with BTRFS RAID?
>
> Peter Ashford
Yeah, you pointed out the real problem here:

[DIFFERENT RESULT FROM DIFFERENT VIEW]
See from *PURE ON-DISK* usage, it is still 600G, no matter what level of 
RAID.
See from *BLOCK LEVEL RAID1* usage, it is 300G. If fs(not btrfs) is 
build on BLOCK LEVEL RAID1,
then the *FILESYSTEM* usage will also be 300G

[BTRFS DOES NOT BELONG TO ANY TYPE]
But, btrfs is neither pure block level management(that should be MD or 
HW RAID or LVM), nor a
traditional filesystem!!

So the root of the problem is, btrfs mixs the position of block level 
management and filesystem level
management, which makes everything hard to understand.
You can't treat btrfs raid1 as a complete block level raid1, due to its 
flexibility on metadata/data profile different.

If vanilla df command shows filesystem level freespace, then btrfs won't 
give a accurate on.

[ONLY PREDICABLE CASE]
For the 300Gx2 case for btrfs, you can only consider it 300G free space 
only if you can ensure that
there was/is and will be only RAID1 data/metadata storing on it.(also 
need to ignore small space usage on CoW)

[RELIABLE DATA IS ON-DISK USAGE]
Only pure on-disk level usage is *a little* reliable. There is still 
problem for unbalanced metadata/data chunk
allocation problem(e.g, all space is allocated for data, no space for 
metadata CoW write).

[FEATURE SIMILAR CASE]
The only case that I may see similar problem will be mirrored thin 
lv(not implemented yet)
and normal thin lv competing for a thin pool.

Although not implemented, I think even implemented, admins may not 
complain so much since LVM doesn't
report free space, only used space on thin pool case.

Thanks,
Qu

>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2014-12-08  2:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-07 15:15 Why is the actual disk usage of btrfs considered unknowable? Shriramana Sharma
2014-12-07 15:33 ` Martin Steigerwald
2014-12-07 15:37   ` Shriramana Sharma
2014-12-07 15:40   ` Martin Steigerwald
2014-12-08  5:32     ` Robert White
2014-12-08  6:20       ` ashford
2014-12-08  7:06         ` Robert White
2014-12-08 14:47       ` Martin Steigerwald
2014-12-08 14:57         ` Austin S Hemmelgarn
2014-12-08 15:52           ` Martin Steigerwald
2014-12-08 23:14         ` Zygo Blaxell
2014-12-07 18:20   ` ashford
2014-12-07 18:34     ` Hugo Mills
2014-12-07 18:48       ` Martin Steigerwald
2014-12-07 19:39       ` ashford
2014-12-08  5:17       ` Chris Murphy
2014-12-07 18:38     ` Martin Steigerwald
2014-12-07 19:44       ` ashford
2014-12-07 19:19   ` Goffredo Baroncelli
2014-12-07 20:32     ` ashford
2014-12-07 23:01       ` Goffredo Baroncelli
2014-12-08  0:12         ` ashford
2014-12-08  2:42           ` Qu Wenruo [this message]
2014-12-08  8:12             ` ashford
2014-12-08 14:34           ` Goffredo Baroncelli
2014-12-08  8:18       ` Chris Murphy
2014-12-08  4:59 ` Robert White
2014-12-08  6:43 ` Zygo Blaxell

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=54851033.7010601@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=ashford@whisperpc.com \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=martin@lichtvoll.de \
    --cc=samjnaa@gmail.com \
    /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.