All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert White <rwhite@pobox.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: btrfs filesystem show _exact_ freaking size?
Date: Tue, 18 Nov 2014 02:39:48 -0800	[thread overview]
Message-ID: <546B21F4.8060203@pobox.com> (raw)

Howdy,

How does one get the exact size (in blocks preferably, but bytes okay) 
of the filesystem inside a partition? I know how to get the partition 
size, but that's not useful when shrinking a partition...

So, for example, you successfully do

btrfs filesystem resize -32G /dev/sdz2

now you've got "some space" zero idea how many sectors can be trimmed 
off the end of the partition, you can do the math but thats a little 
iffy, especially if the file system didn't originally fill the partition 
to begin with.

The current methodology for most such actions is to way over-trim the 
file system, then reallocate the space using your partition tool of 
choice, then re-grow the filesystem to fit. This has been the way of 
things forever and it blows...

There needs to be an option to btrfs filesystem show that will tell you 
XXXXXblocks, not Y.ZZ terabytes.


             reply	other threads:[~2014-11-18 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 10:39 Robert White [this message]
2014-11-18 10:59 ` btrfs filesystem show _exact_ freaking size? Hugo Mills
2014-11-18 11:26 ` Gabriel de Perthuis
2014-11-18 12:41 ` Duncan

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=546B21F4.8060203@pobox.com \
    --to=rwhite@pobox.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 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.