linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dave@jikos.cz>
To: Jordan Windsor <jordanw2@gmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: What's the minimum size I can shrink my FS to?
Date: Tue, 6 Nov 2012 00:15:02 +0100	[thread overview]
Message-ID: <20121105231502.GP3102@twin.jikos.cz> (raw)
In-Reply-To: <CACCfv7o-=NEYAWu=Q2CTZYuk2ii6kmYoNuA94XxdMPrf3Sg_Kg@mail.gmail.com>

On Sat, Nov 03, 2012 at 03:10:52PM +1030, Jordan Windsor wrote:
> [root@archpc ~]# btrfs fi df /home/jordan/Storage/
> Data: total=580.88GB, used=490.88GB

This is getting full, 84%, there is not much chance of getting rid of
substantially many 1G-chunks through the 'usage=1' balance filter.
Some of the space between 490G and 580G will be spent on slack space and
fragmentation, the rest may be packed together by a higher usage= value
(but will be slower due to relocating more data).

> System, DUP: total=32.00MB, used=76.00KB
> System: total=4.00MB, used=0.00
> Metadata, DUP: total=13.01GB, used=1001.83MB

If you intend to shrink a filesystem, all space group types must be
taken into account, so here you have at least

580G + 2x32M + 4M + 2x13G = ~607G

> [root@archpc ~]# btrfs fi sh
> failed to read /dev/sr0
> Label: 'Storage'  uuid: 717d4a43-38b3-495f-841b-d223068584de
> Total devices 1 FS bytes used 491.86GB
> devid    1 size 612.04GB used 606.96GB path /dev/sda6
                                ^^^^^^
confirmed :)

So basically you cannot go under this number when shrinking. I think you
can squeeze the metadata space down to 2G (or maybe to 1G, it's getting
very close to 1G so hard to guess) by the -musage= filter AND using at
least 3.7 kernel (or 3.6+ chris' for-linus branch) with the fixed
over-allocation bug (otherwise the size will stay pinned at 2% of the
filesystem size).

david

  reply	other threads:[~2012-11-05 23:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-03  4:09 What's the minimum size I can shrink my FS to? Jordan Windsor
2012-11-03  4:13 ` cwillu
     [not found]   ` <CACCfv7rQ4Gqiaf8r7XRMDQnXe_xT0-eJPoLCFTFneWOYwkuaEQ@mail.gmail.com>
2012-11-03  4:40     ` Jordan Windsor
2012-11-05 23:15       ` David Sterba [this message]
2012-11-06 15:34         ` Jordan Windsor

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=20121105231502.GP3102@twin.jikos.cz \
    --to=dave@jikos.cz \
    --cc=jordanw2@gmail.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).