Problem removing swap partition
You are using LVM. GParted cannot see beyond the LVM volume, it can only see that the LVM volume is present.
115 GiB = 115*1024*1024*1024 bytes ~ 123480000000 = 123.48*1000*1000*100 = 123.48 GB (close enough to your SSD size) - that's an artifact of using SI decimal prefixes in some places and binary prefixes in others.
Presumably the 4GB swap partition you made was not formatted correctly. You can unmount it and run:
sudo mkswap /dev/ubuntu-vg/swap_1
sudo swapon -a
What Ubuntu did here is presumably this:
- Created a 250 MB
/boot
primary partition. - Created an extended partition for the rest of the partitions.
- Created an LVM volume within the above extended partition.
- Created your root and swap partitions within the LVM volume.
(That's why you have both sda2
and sda5
. Try using the lsblk
command to see how they're related.)
Why the swap partition did not get formatted correctly is a mystery.
To delete the swap and merge back the space to root:
-
Disable swap. The live environment automatically activates any swap partitions it finds:
sudo swapoff -a
-
Use
lvremove
to remove the LVM logical volume of the swap:lvremove ubuntu-vg/swap_1
-
Extend the root partition's logical volume using lvextend:
lvextend ubuntu-vg/root /dev/sda5
This will use all the available space on
/dev/sda5
(the 4GB left). -
Use resize2fs to resize the filesystem on the root partition to use the new extra space:
resize2fs /dev/ubuntu-vg/root
Follow the steps below:
-
Delete the 4GB ext4 disk partition (previously, swap) so that File System shows unallocated space.
-
Now, right-click the linux partiton (in your case, /dev/sda2) and select resize.
-
Include the unallocated disk space into the linux partition by allocating as per your requirement.
UPDATE
In your case :
-
Use, Ctrl+Alt+T
-
Execute
sudo lvremove -f dev/ubuntu-vg/swap_1
to remove your swap partition. -
Also, executing,
sudo lvextend -L +3.89g dev/ubuntu-vg/root
will extend your ext4 partition. -
Use
resize2fs dev/ubuntu-vg/root
will resize your new extended space to your ext4 partition.NOTE: You'll need to reboot your system to take effect.
If you're using Ubuntu it's very simple:
- Open the terminal (ctrl+alt+t) and execute
swapoff -a
- Open
gparted
and then delete the swap partitions.