Rocky 8 expand /home

Sorry for the noobie question here.
I am trying to expand my /home mount.
I am running a machine in proxmox and have expanded the primary disk.
Then used cfdisk to expand the disk in the OS.
I then run pvresize to resize the physical volume and this is where i am stuck.
I can see the disk size is expanded but cant seem to expand the file system. i tried the xfs_growfs /home but that does not work it remains the same size.

PV is now larger. Therefore, the VG is larger. But the LV …

Use lvextend, with --resizefs, so it calls the xfs_growfs for you.

i tried running that but get an error, is there something i am missing?

which file system on /home xfs or ext4 ?

If xfs did you try below after increasing the pv size

lvextend -l +100%FREE /dev/VGNAME/LVNAME

( replace VGNAME and LVNAME as per of home lvm )


xfs_growfs /dev/VGNAME/LVNAME

if still not working share the output of

cat /etc/fstab

@linuxlover That worked perfect, thanks very much for the assistance.

1 Like

Yes. Two things:

  • lvextend --resizefs /home does not refer to the LV correctly. man lvextend shows use of VGNAME/LVNAME, so there should probably have been rl_rocky8--docker/home rather than /home
  • Target size was not stated. The -l +100%FREE is one way to do it – “add all you can”

Hence: lvextend --resizefs -l +100%FREE rl_rocky8--docker/home

PS. You could probably copy-paste text from terminal to post – much nicer than bitmap images.