1

Topic: Cannot resize btrfs partition

My Drive layout is like this:

sda1 - 600M esp
sda2 - 4800M btrfs
sda3 - 2800M ntfs

I removed sda3, and tried to resize sda2 to take up the space vacant by sda3.

In the process, Gparted give me some error, so the resize failed.

Question 1:
How can I find out where the error messages are stored so that I can post them here?

I am using Fedora, which GParted is of version 1.1 .  Will it help to use latest version 1.2 by using the Live CD?

2

Re: Cannot resize btrfs partition

GParted doesn't write any messages to the computer's drives, as the filesystem is located in RAM. The content disappears with system's shutdown. You can save the "GParted details" in html format, and you can save this file to any removable (or non-removable) device after mounting it. GParted details are available every time GParted finishes the scheduled operations or after stopping on any error.

Latest version (1.2.0) doesn't change anything especially for btrfs, so probably 1.1.0 would be good too.


sampsonf wrote:

My Drive layout is like this:

sda1 - 600M esp
sda2 - 4800M btrfs
sda3 - 2800M ntfs

Do you mean MB or GB / GiB ?

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: Cannot resize btrfs partition

If (1) Fedora OS was running and you ran GParted from there, and (2) you explicitly saved the results they will be saved to /root/gparted_details.htm by default or which ever alternative file name you specified.

Otherwise it will be as class413 said and the results weren't saved.

Hint: Try the resize again following the above method, save the results to /tmp/gparted_details.htm and share them here.

4 (edited by sampsonf 2021-01-29 06:29:52)

Re: Cannot resize btrfs partition

mfleetwo wrote:

If (1) Fedora OS was running and you ran GParted from there, and (2) you explicitly saved the results they will be saved to /root/gparted_details.htm by default or which ever alternative file name you specified.

Otherwise it will be as class413 said and the results weren't saved.

Hint: Try the resize again following the above method, save the results to /tmp/gparted_details.htm and share them here.

Thank you for all the replies.

Yes, I ran it under Fedora and did not save results.  Now I understand they are lost as I did not save them.

After doing internet search, I done the following to fix my issue:

1.  The error is actually outout of the command "btrfs check /dev/sdb2" .  I just run the command again in the shell, and noted all the errors

# output of manual run of "btrfs check"
# btrfs check /dev/sdb2
Opening filesystem to check...
Checking filesystem on /dev/sdb2
UUID: 6a32b7e3-0ad3-4316-942d-ec568e1e86f8
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
root 2605 inode 265194 errors 1040, bad file extent, some csum missing
root 2605 inode 265196 errors 1040, bad file extent, some csum missing
root 2605 inode 265276 errors 1040, bad file extent, some csum missing
root 2605 inode 265277 errors 1040, bad file extent, some csum missing
root 2605 inode 388102 errors 1040, bad file extent, some csum missing
root 2605 inode 461837 errors 1040, bad file extent, some csum missing
root 2605 inode 461861 errors 1040, bad file extent, some csum missing
root 2605 inode 461949 errors 1040, bad file extent, some csum missing
root 2605 inode 473415 errors 1040, bad file extent, some csum missing
root 2605 inode 473441 errors 1040, bad file extent, some csum missing
root 2605 inode 473523 errors 1040, bad file extent, some csum missing
ERROR: errors found in fs roots
found 4233350721536 bytes used, error(s) found
total csum bytes: 3846749568
total tree bytes: 6861389824
total fs tree bytes: 2287894528
total extent tree bytes: 242122752
btree space waste bytes: 861404838
file data blocks allocated: 6028896813056
referenced 5342444609536

2.  As checked, all error is local to the subvol with ID 2605.
3.  I create a new subvol, then move all contents from subvol 2605 to the new subvol.  Then remove subvol 2605
4.  run "btrfs check" again, and luckily all errors are gone for me.
5.  I start gparted again, resize and this time everything is OK.
6.  rename / move the new subvol to match that of subvol 2605.