Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: Duncan <1i5t5.duncan@cox.net>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: get more accurate output in fd command.
Date: Thu, 11 Dec 2014 16:25:31 +0800	[thread overview]
Message-ID: <548954FB.4040603@cn.fujitsu.com> (raw)
In-Reply-To: <pan$cfb2$ba6f2e5a$22f18b38$e1aba3e7@cox.net>

On 12/11/2014 11:53 AM, Duncan wrote:
> Dongsheng Yang posted on Wed, 10 Dec 2014 23:02:15 +0800 as excerpted:
>
>>> And in the example, the mkfs was supplied with two devices, so there's
>>> no dup metadata remaining from a formerly single-device filesystem,
>>> either. (Tho there will be the small single-mode stubs, empty,
>>> remaining from the mkfs process, as no balance has been run to delete
>>> them yet, but those are much smaller and empty.)
>> Yes. One question not related here: how about delete them in the end of
>> mkfs?
> GB covered the old, manual balance method.  Do a btrfs balance -dusage=0
> -musage=0 (or whatever, someone posted his recipe doing the same thing
> except with the single profiles instead of zero usage), and those stubs
> should disappear, as they're empty so there's nothing to rewrite when the
> balance does its thing and it simply removes them.
>
> FWIW I actually have a mkfs helper script here that takes care of a bunch
> of site-default options such as dual-device raid1 both data/metadata,
> skinny-metadata, etc, and it actually prompts for a mountpoint (assuming
> it's already setup in fstab) and will do an immediate mount and balance
> usage=0 to eliminate the stubs if that mountpoint is filled in, again
> assuming it appears in fstab as well.  Since I keep fully separate
> filesystems to avoid putting all my data eggs in the same not-yet-fully-
> stable btrfs basket, and my backup system includes periodically blowing
> away the backup and (after booting to the new backup) the working copy
> with a fresh mkfs for a clean start, the mkfs helper script is useful,
> and since I was already doing that, it was reasonably simple to extend it
> to handle the mount and stub-killing balance immediately after the mkfs.
>
>
> But at least in theory, that old manual method shouldn't be necessary
> with a current (IIRC 3.18 required) kernel, since btrfs should now
> automatically detect empty chunks and automatically rebalance to remove
> them as necessary.  However, I've been busy and haven't actually tried
> 3.18 yet, and thus obviously haven't done a mkfs and mount of a fresh
> filesystem to see how long it actually takes to trigger and remove those
> stubs, so for all I know it takes awhile to kick in, and if people are
> bothered by the display of the stubs before it does, they can of course
> still do it the old way.

Thanx Duncan, I tried the old manual method. It works well to me. Will 
try the new kernel later.
>


  reply	other threads:[~2014-12-11  8:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  2:19 [bug] df reports wrong Size and Avail on raid1, 3.18rc2 Chris Murphy
2014-10-29  2:26 ` Eric Sandeen
2014-12-09 11:20 ` [PATCH] Btrfs: get more accurate output in fd command Dongsheng Yang
2014-12-09 18:47   ` Goffredo Baroncelli
2014-12-10  1:08     ` Dongsheng Yang
2014-12-10 10:53       ` Robert White
2014-12-10 13:21         ` Duncan
2014-12-10 15:02           ` Dongsheng Yang
2014-12-10 19:05             ` Goffredo Baroncelli
2014-12-11  8:23               ` Dongsheng Yang
2014-12-11  3:53             ` Duncan
2014-12-11  8:25               ` Dongsheng Yang [this message]
2014-12-10 20:36           ` Robert White
2014-12-10 21:03             ` Goffredo Baroncelli
2014-12-10 14:51         ` Dongsheng Yang
2014-12-10 18:25         ` Goffredo Baroncelli
2014-12-11  8:28           ` Dongsheng Yang
2014-12-10 13:59   ` Shriramana Sharma
2014-12-10 14:56     ` Dongsheng Yang

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=548954FB.4040603@cn.fujitsu.com \
    --to=yangds.fnst@cn.fujitsu.com \
    --cc=1i5t5.duncan@cox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox