shrink btrfs partition - recommended way?

Ulli Horlacher <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
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.
                                       
-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart         E-Mail: [email protected]
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    https://www.tik.uni-stuttgart.de/
REF:<[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.