I have a SanDisk SSD U100 124GB. When I installed Ubuntu 14.04 I partitioned as:
- 250mb boot; - 4gb swap; - the rest ext4.
Some times later, I removed the swap partition in order to merge it with the big one since I do not need it. I have successfully removed the swap and format to ext4 but I am not able to merge it and I don't understand what is happening.
In gparted I see only one device (/dev/sda
) of size 115.48GB subdivided like this:
- /dev/sda1 250MiB ext2
/boot
; - /dev/sda2 115.24 GiB extended;
- /dev/sda5 115.24 GiB
lvm2
pvubuntu-vg
.
Why do I have 2 partition sda2
and sda5
and not only 1? And why the size is 115 and not 120? Moreover why I cannot see the 4 gb of swap which I have formatted?
If I open disks under disk drives I have my 124 hdd which is partitioned as:
- 250 MB ext2;
- 124GB Extended partition 2;
- 124GB Partition 5 LVM2 PV.
But I have also under Other Devices 2 disks:
- 120GB Block Device
/dev/ubuntu-vg/root
; - 4GB Block Device
/dev/ubuntu-vg/swap_1
.
I don't understand all of this. What are other devices? And why gparted and disks show me different things.
When I boot, the 4gb are automatically mounted in media and I can browse it like a classical usb drive.
Update
Following the suggestion of @muru I have restored the swap and now I have
lvm pvs: /dev/sda5 ubuntu-vg lvm2 a-- 115.24g 40.00m
lvm vgs: ubuntu-vg 1 2 0 wz--n- 115.24g 40.00m
lvm lvs: root ubuntu-vg -wi-ao--- 111.32g
swap_1 ubuntu-vg -wi-a---- 3.89g
Let's suppose now that I use a livecd. Could you please tell me the commands to delete swap_1 and merge it with root (I would like to avoid to mess up all the system
fdisk -l
,lvm pvs
,lvm vgs
andlvm lvs
?