1

I have a dual boot setup with Fedora and Windows. For personal reasons, I have uninstalled Windows and would like to use the freed-up space to expand my Fedora partition (which is on a logical partition inside an extended partition).

I am using GParted on Fedora to manage my partitions.disk partitions

The 66.90GiB unallocated space is where Windows used to be. I am trying to move that space into the extended partition (/dev/sda4) and eventually merge it with /dev/sda6, but GParted does not allow me move/resize the extended partition to make use of the free space. I read that

In Disk Management, unpartitioned space in primary partition area is called unallocated space, while unpartitioned space in extended partition area is named free space; unallocated can’t be used to extend to or create logical partition, and free space can’t be used to enlarge to or create primary partition. (Source: https://www.partitionwizard.com/convertpartition/primary-partition-vs-logical-drive.html)

I'm not sure how true the above statement is, because people seem to have done it or somehow worked around the issue. I have looked at several questions on StackExchange including:

but I'm not sure if they're completely applicable here.

So my question is: how do I move the unallocated space into the extended partition to merge it with the fedora logical partition?

Any help would be appreciated!

Extra Info:

  • My computer uses MBR and not GPT, so I am only allowed 4 primary partitions, if that's relevant.
  • I can freely move/resize /dev/sda5 and /dev/sda6 around inside the extended partition, but I cannot move/resize the extended partition iteslf.

lsblk output

lsblk output

parted -l output

parted -l output

fdisk -l output fdisk -l output

5
  • Are you using the installed Fedora system or an external Live Boot disc? You should be using the latter.
    – AFH
    Apr 15, 2018 at 0:19
  • Why not just create a new PV in /dev/sda2 and add it to the VG? Apr 15, 2018 at 0:49
  • @AFH I was using a Live USB! Anyway, I've just solved it. Thanks for the response though!
    – omijn
    Apr 15, 2018 at 0:50
  • @IgnacioVazquez-Abrams I'm a bit new to this, didn't realize I could do that!
    – omijn
    Apr 15, 2018 at 0:52
  • Sorry, I'd forgotten that Live Boot discs will use a swap partition if it finds it on the hard disc. I should have thought of it.
    – AFH
    Apr 15, 2018 at 10:30

1 Answer 1

1

I just solved it, and I'll post the answer here in case someone else faces a similar problem.

I was unable to resize the partition because my swap space was still in use, so I found out I could disable it using swapoff -a.

After doing this, GParted allowed me to merge the unallocated space with the fedora logical partition. I then right clicked on the logical partition and selected the Check option.

Finally, I used the following to actually allocate the free space to the root and home partitions:

lvextend -L +20G /dev/fedora/home
lvextend -L +20G /dev/fedora/root
resize2fs /dev/fedora/home
resize2fs /dev/fedora/root

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .