Expand system partition

Hi!

I’ve been trying to expand my Fedora partition for some time using gparted. To expand the partition i removed my windows partition since i didn’t require it any more. However i can’t come up with a way to relocate the different partitions in a manner that allows for the expansion of my system partition. My goal is to assign all of the unallocated space to my primary partition.

Any tips on how to achieve this?

Hi,

Since you’re using Logical Volume Management I think the easiest solution might be to create a new Physical Volume (see pvcreate command) from the un-allocated space then add the new physical volume to the Volume Group (vgdisplay and lvdisplay commands for lists of current VGs and LVs) that that your existing system partition is in.

Once you do that should be able to extend (lvextend command) your system partition to use the newly available space.

If this is the first time you’ve used LVM it might be a good idea to read up a bit about it before making any changes. Here’s a few links that might be useful.

General overview of LVM here and here
Steps to add a physical volume to a volume group here

The steps would be something like this:

  1. Partition the un-allocated space
  2. Create a new Physical Volume from the newly created partition (pvcreate)
  3. Assign new Physical Volume to the existing Volume Group used by your system LVM (used vgdisplay for a list of VGs and vgextend to add the new PV)
  4. Extend the existing Logical Volume your Fedora partition is using ( lvdisplay to list logical volumes and lvextend to extend)

EDIT: Almost forgot, make a backup first :+1:

Shecks

https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
I’ve used that tutorial several times.

Only thing that does never work for me is resize2fs. I always have to use xfs_growfs. Other than that, it’s a step by step tutorial with all commands needed.

Hi!

Thank you both for the support!
resize2fs worked flawlessly as did the rest.

Cheers!

1 Like