You are not logged in.

#1 2014-01-18 17:09:36

crossroads1112
Member
Registered: 2014-01-08
Posts: 24

Cant resize a btrfs partition with gparted?

I am trying to make my home partition about 50G smaller so I can test out another distro. I booted into the gparted live cd and attempted to resize the partition and it gave me a generic error message. I clicked "save details" and this was the output

GParted 0.16.1 --enable-libparted-dmraid

Libparted 2.3
Shrink /dev/sda2 from 900.00 GiB to 849.60 GiB  00:00:20    ( ERROR )
     	
calibrate /dev/sda2  00:00:00    ( SUCCESS )
     	
path: /dev/sda2
start: 62916608
end: 1950353407
size: 1887436800 (900.00 GiB)
check file system on /dev/sda2 for errors and (if possible) fix them  00:00:20    ( ERROR )
     	
btrfsck /dev/sda2
     	
Checking filesystem on /dev/sda2
UUID: 626adbe1-f524-4fce-b322-37c64ba076a9
found 4716365260 bytes used err is 1
total csum bytes: 119907840
total tree bytes: 265175040
total fs tree bytes: 112640000
total extent tree bytes: 20889600
btree space waste bytes: 32620541
file data blocks allocated: 208404881408
referenced 193666433024
Btrfs v0.20-rc1
checking extents
checking free space cache
checking fs roots
root 5 inode 286 errors 200
root 5 inode 585 errors 200
root 377 inode 286 errors 200
root 377 inode 585 errors 200
root 384 inode 286 errors 200
root 384 inode 585 errors 200

========================================
Create Primary Partition #1 (ext4, 50.40 GiB) on /dev/sda

========================================

Any idea what I can do to fix this?

Last edited by crossroads1112 (2014-01-18 17:10:22)

Offline

#2 2014-04-01 04:01:31

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: Cant resize a btrfs partition with gparted?

@crossroads1112 Have you made any headway? I am having similar problems.

Offline

#3 2014-04-01 04:14:17

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Cant resize a btrfs partition with gparted?

Just use the command line tools.  Resizing btrfs as a filesystem happens online.  So with it mounted just do:

# btrfs filesystem resize 1:-50G /path/to/btrfs 

(Where the '1' is the devid)

Then just use gdisk, cgdisk, or whatever to resize the partition.  Delete the old partition that it sits on, then make a new one that starts at exactly the same sector and ends wherever you would like it to be.  Just make sure that the partition boundaries are larger than the filesystem, otherwise you're going to have a bad time.

Offline

Board footer

Powered by FluxBB