Increasing size of root partition. No space left on root

I’ve had to start uninstalling applications due to lack of space during upgrades (I have plenty of space on the SSD, it’s just the root partition that is full). I’m looking for the recommended way to resize the root partition in Silverblue (31). I’ve seen various guides across the Internet, but I’d rather get a recommendation from someone who has done this before on Silverblue. From my understanding, this is possible. If it’s isn’t–or at least isn’t recommended–would it be best to reinstall?

Thank you for your time.

It all depends of your partitioning scheme. If you are using standard partitions and all space is assigned to them, the only option is to reinstall the system. But if you use LVM to manage the space there may be still possible to do something with this.

If you are running the default lvm partitioning scheme then you can run sudo vgs to see if there is anything available in the vgroot volume group under the VFree column. If there is space available you can resize the root lv with lvresize --size=XXg --resizefs /dev/mapper/vgroot-root. Where XX is the new size you want the filesystem to be.

1 Like

There were my steps from the last time i did it. With help from this video.

I had two volumes on my SSD and only one was allocated for Fedora Silverblue and other part was unallocated(free space) You cannot extend directly LVM from free space, it must be in another LVM partition.
Prerequisite step is to create a new partition from that free space with the same format as your system (ex. LVM2 pv)

My disk volume group was named fedora automatically when system was installed - hope this does not confuse you.

1. Check VG Name - volume group name

$ vgdisplay

output:
— Volume group —
VG Name fedora

2. Check physical volumes

$ pvdisplay

output:
----- Physical Volume
PV Name /dev/nvme0n1p7
VG Name fedora

PV Name /dev/nvme0n1p2
VG Name

As we see /dev/nvme0n1p2 has no volume group name - this is partition we can attach to system partition.

3. Add second partition to the sameme volume group fedora

$ vgextend fedora /dev/nvme0n1p2

Now /dev/nvme0n1p2 is part of fedora volume group but yet space is not available.

4. Check physical volumes again

$ pvdisplay

output:
----- Physical Volume
PV Name /dev/nvme0n1p7
VG Name fedora

PV Name /dev/nvme0n1p2
VG Name fedora

Same as step 2 but now we can see new partition now is part of the same volume group fedora

5. Check what is mounted on fedora root

$ df -h

output:
/dev/mapper/fedora-root

6. Extend fedora-root, this will use free space from our second partition we just added to fedora volume group.

$ lvextend -L +47.77G /dev/fedora/root

output:
Size of logical volume fedora/root changed from <62.83 GiB (16084 extents) to 110.60 GiB (28314 extents).
Logical volume fedora/root successfully resized.

7. Finally apply changes

$ resize2fs /dev/fedora/root

output:
The filesystem on /dev/fedora/root is now 28993536 (4k) blocks long.