0

I have a filesystem partition where the Ubuntu SO is installed and another one with 393Gb free space, how can I resize the filesystem partition and use the free space? What I did...

I started Ubuntu with a live CD and ensured that the partition (where Ubuntu is installed), was unmounted.

I tried to allocate the extra space in the Ubuntu partition, but Gparted does not allow me, it does not show me the free space available, and I have no clue why.

enter image description here

  • 2
    Does this answer your question? How to resize partitions? – guiverc Mar 07 '24 at 06:53
  • Not sure why two swap partitions and a 1MB ext4 partition. Another alternative is to use free space as /home, then 92GB for / would be rather large. Move Home & https://ubuntuforums.org/showthread.php?t=2455822&p=14010437#post14010437 Or use as data partition. https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting – oldfred Mar 07 '24 at 13:44

1 Answers1

0

Partitions are boundaries on the hard disk. For any partition to expand, the free space needs to be next to the partition being expanded.

In your case above, the free space is not next to partition 5 that you want to expand, but between partition 6 and the previous partition (I am assuming partition 3).

What you need to do is to move the partitions to shift the empty space between partition 4 and partition 5, which will then allow you expand partition 5 as required (all operations to be done when booted via the live CD as you correctly did).

Before:

|1|...---p3---|      free space      |--p6--|--p7--|--p8--|--p4--|--p5--|

Expected state afterwards:

|1|...---p3---|--p6--|--p7--|--p8--|--p4--|      free space      |--p5--|

The following documentation in gparted should help you with the moving: https://gparted.org/display-doc.php%3Fname%3Dmoving-space-between-partitions

Warning Note: Partition moving is a risk-prone operation:

  • It's sensitive to lost power.
  • It cannot be undone.

As your free space is much larger than the partitions that need to be moved, your risk is lower, but still please run this operation when you do not risk power loss of any sort.

Samveen
  • 180
  • 10