I am trying to expand the fedora partition on my NVME drive to use all the empty space. I tried using Gparted Live to move my fedora install to the left of the empty space, and was able to move the EFI System Partition and boot partition (p3 & p4), but when moving the actual fedora partition I got an error “We have a space info key for a block group that doesn’t exist”. I read that this error is benign and can be ignored, but Gparted doesn’t let me proceed either way.
So I’m wondering if there is a better way to go about this? I also tried creating a btrfs partition with the unallocated space and using btrfs send to send snapshots but I couldn’t figure out how to send all subdirectories. I am not sure how to proceed, I’m open to any solution if anyone knows what I should do. Thanks for reading
Since fedora 43 has expanded the size of /boot to 2GB it may be appropriate to expand your p4 (/boot) partition to 2GB while messing with things.
As long as you are booted from the live media you should be able to just move p5 to the left without changing its size. It will take quite some time since it needs to copy everything bit for bit to the new location.
Once the move of the partition has completed it should then be possible to resize it into the space that is now to the right.
I tried this, expanding the size of /boot to 2GB worked, but when I tried to move the partition to the left the operation still aborted with the error “We have a space info key for a block group that doesn’t exist”. I found this link discussing the error: https://www.spinics.net/lists/linux-btrfs/msg160026.html, they say you can mount with “space_cache=v2,clear_cache” to fix the issue, but I’m a bit out of my depth at this point and not sure if I should do that here or how.
Your screenshots shows mountpoints / and /home for /dev/nvme0n1p5. This suggests to me that you are trying to do this from the running system instead of from a a live system. As @computersavvy pointed out, you should be able to move your partition to the beginning of the empty space as long as it is not in use (=mounted). However, there is still a risk of data loss, so make sure you have a backup of any data on the partition you would want to preserve.
One btrfs filesystem can include multiple partitions (in fact, they don’t have to be contiguous or even on the same disk).
So instead of expanding the existing partition, an alternative would be to create a new partition in the free space, and add that new partition to the existing btrfs filesystem.
I could now move the partition around
Thanks everyone for your assistance! And if anyone tries to replicate these instructions, please note I don’t really know what I’m doing and you should do so at your own risk.