Extending root partition on Fedora 40 server

I have a Fedora 40 server with a big /data partition and a full root partition.

Booted into GParted and this is the picture
Click image for larger version. Name:  GParted_before.jpg Views:  7 Size:  71.5 KB ID:  34252

I then went ahead to expand /dev/sda3 after moving the /dev/sda4 partition
Click image for larger version. Name:  GParted_after.jpg Views:  6 Size:  65.5 KB ID:  34253

Next I extended the Logical Volume: lvextend -l +100%FREE /dev/mapper/fedora_acer--bkp--server-root. I got a message that the volume has been extended to the max size and when I run vgdisplay I see the size expanded; i.e.

root@acer-bkp-server: vgdisplay
--- Volume group ---
VG Name fedora_acer-bkp-server
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 206.05 GiB
PE Size 4.00 MiB
Total PE 52749
Alloc PE / Size 8960 / 35.00 GiB
Free PE / Size 43789 / 171.05 GiB
VG UUID 4yZeFq-jTkd-OfuC-651g-ihg1-d3C1-RYUHad

Next I resized the filesystem via xfs_growfs /dev/mapper/fedora_acer--bkp--server-root

Finally check the size of the root partition via df-h but it still reports the initial size and I’m not clear why xfs_grow doesn’t work

Unless I made any mistakes above the only thing I could think of is that the xfs_growfs command doesn’t work properly because the root partition is full.

Any ideas?

Add this flag: --resizefs

See also: Disk resize with GParted gone wrong - #4 by vgaetera

1 Like

Thank you. That worked :slight_smile:

1 Like