BTRFS partition no longer mounting after resize

I resized my fedora root partition to gain some free space, but now I can no longer mount the partition, which is terrible since I can no longer boot.

What I have done for now:
I checked dmesg, it contains something like:
open_ctree failed: 24
device total bytes should be ... (a number that is most likely 100 GiB, the new size) but found (another big number which is likely 143GiB the old size)

I tried:
sudo btrfs check /dev/nvme0n1p6
sudo btrfs rescue fix-<something about size I forgot> /dev/nvme0n1p6
and other related commands, none returned an error and even the rescue command related to size reported no problem, but I still cannot mount the partition

Sorry for the not so well presented question, but I’m not able to paste the dmesg error into here from the live usb.

What did you use to resize the partition?

KDE partition manager from live USB. I unmounted before the resize

I’m usually comfortable using the terminal except for anything related to partitioning.

I guess I will reinstall I can’t have downtime now, good thing my home is in a separate partition

KDE partition manager should be fine.

In this case, the GUI file managers are generally an easier choice because they are btrfs aware and will know to resize the btrfs filesystem before changing the partition boundaries.

However, any time you make partition or major filesystem changes, there is a chance of data loss. That operation isn’t without risk.

Sorry to hear that you need to reinstall. At this point I have suffered so much data loss over the years that I always back up everything in advance.

The good thing about Linux is how easy to reinstall. For me with a separate /home reinstalling is a relatively minor inconvenience. I just need to install my apps back and configure the system a little bit.

Yes I actually also backup my home to a separate drive using rsync so no big trouble (had to lose an assignment I completed to learn the lesson)

1 Like