From: Roman Mamedov <rm@romanrm.net>
To: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: shrink btrfs partition - recommended way?
Date: Mon, 29 Jun 2026 04:54:11 +0500 [thread overview]
Message-ID: <20260629045411.75f3d6d7@nvm> (raw)
In-Reply-To: <20260628233658.GA3404176@tik.uni-stuttgart.de>
On Mon, 29 Jun 2026 01:36:58 +0200
Ulli Horlacher <framstag@rus.uni-stuttgart.de> wrote:
>
> Is there a recommended way (or tool) to shrink a btrfs partition?
>
> I have:
>
> root@zoo:~# lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTS /dev/sdc
> NAME SIZE FSTYPE MOUNTPOINTS
> sdc 256G
> `-sdc1 256G btrfs /LXC
>
> root@zoo:~# df -Th /LXC
> Filesystem Type Size Used Avail Use% Mounted on
> /dev/sdc1 btrfs 256G 19G 236G 8% /LXC
>
> And want to shrink /dev/sdc1 to 200 GB
>
> I know, I can use btrfs filesystem resize and afterwards use fdisk to
> delete /dev/sdc1, create a new smaller /dev/sdc1 and then add a new
> /dev/sdc2
> BUT if make a calculation error with fdisk the btrfs filesystem will be
> damaged.
> gparted can do it all together in one step, but it needs X11, which I do
> not have on host zoo. I have only text console access, no X11.
I'd shrink it to like 180GB first, to avoid most chances of calculation and
GiB vs GB errors. As for shrinking the partition, 'cfdisk' has a resize
function. Then expand Btrfs to 'max'.
--
With respect,
Roman
next prev parent reply other threads:[~2026-06-29 0:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-28 23:36 shrink btrfs partition - recommended way? Ulli Horlacher
2026-06-28 23:54 ` Roman Mamedov [this message]
2026-06-29 0:42 ` Qu Wenruo
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=20260629045411.75f3d6d7@nvm \
--to=rm@romanrm.net \
--cc=framstag@rus.uni-stuttgart.de \
--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