linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Greenslade <sean@seangreenslade.com>
To: linux-btrfs@vger.kernel.org
Subject: btrfs fi usage bug during shrink
Date: Mon, 1 Aug 2016 00:00:45 -0400	[thread overview]
Message-ID: <20160801040044.GA18667@coach.home> (raw)

Hi, all. I was resizing (shrinking) a btrfs partition, and figured I'd
check in on how it was going with "btrfs fi usage." It was quite
startling:

$ sudo btrfs fi usage /mnt/

Overall:
    Device size:		 370.00GiB
    Device allocated:		 372.03GiB
    Device unallocated:		  16.00EiB
    Device missing:		     0.00B
    Used:			 360.56GiB
    Free (estimated):		     0.00B	(min: 8.00EiB)
    Data ratio:			      1.00
    Metadata ratio:		      2.00
    Global reserve:		 224.00MiB	(used: 0.00B)

Data,single: Size:370.02GiB, Used:359.31GiB
   /dev/mapper/c1	 370.02GiB

Metadata,DUP: Size:1.00GiB, Used:639.22MiB
   /dev/mapper/c1	   2.00GiB

System,DUP: Size:8.00MiB, Used:64.00KiB
   /dev/mapper/c1	  16.00MiB

Unallocated:
   /dev/mapper/c1	  16.00EiB


It's reasonably obvious what's going on, here. The overall size has been
set to the final size, and now the worker is going through balancing all
the chunks that are now out of bounds. 

I feel like "fi usage" should probably have some logic to detect this
situation and report something more sensible. Thankfully, it's only
transient, and returns to normal once the resize completes.

Thanks,

--Sean


                 reply	other threads:[~2016-08-01  4:10 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=20160801040044.GA18667@coach.home \
    --to=sean@seangreenslade.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).