Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: Christoph Anton Mitterer <calestyo@scientia.org>
Cc: Andrei Borzenkov <arvidjaar@gmail.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: exactly shrinking btrfs on a device?
Date: Sun, 7 Apr 2024 19:29:13 +0500	[thread overview]
Message-ID: <20240407192913.0682fa4d@nvm> (raw)
In-Reply-To: <d7c9378abccd7a7c243fc10938c6ba1ba48db232.camel@scientia.org>

On Sun, 07 Apr 2024 04:52:06 +0200
Christoph Anton Mitterer <calestyo@scientia.org> wrote:

> On Sat, 2024-04-06 at 08:03 +0300, Andrei Borzenkov wrote:
> > Why not? You set the container to the exact size and let btrfs grow
> > up 
> > to it. Or may be you need to clarify your question.
> 
> Well... maybe, I guess, I just wanna know where it exactly ends. ^^

Try "btrfs fi show /mnt/point/ --raw". It will show the device size in
bytes, as used by Btrfs. 

...
	devid    1 size 503251058688 used 400023945216 path /dev/sda3
...

# blockdev --getsize64 /dev/sda3
503251060736

This seems to be the number you're looking for.

In my case we can see that since the total device size is not a multiple of
4096, Btrfs has left 2048 bytes unused at the end.

-- 
With respect,
Roman

  reply	other threads:[~2024-04-07 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 22:22 exactly shrinking btrfs on a device? Christoph Anton Mitterer
2024-04-05 22:37 ` Roman Mamedov
2024-04-05 22:41   ` Christoph Anton Mitterer
2024-04-06  5:03     ` Andrei Borzenkov
2024-04-07  2:52       ` Christoph Anton Mitterer
2024-04-07 14:29         ` Roman Mamedov [this message]
2024-04-08  2:00           ` Christoph Anton Mitterer

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=20240407192913.0682fa4d@nvm \
    --to=rm@romanrm.net \
    --cc=arvidjaar@gmail.com \
    --cc=calestyo@scientia.org \
    --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