I am running Ubuntu 14.04 LTS in VMware. I recently ran out of space so I decided to add a 10GB volume. The problem is I didn't install ubuntu with lvm initially so now I am trying to do it retrospectivly. I have tried https://github.com/g2p/blocks but for some reason I wasn't able to install it on the liveCD.
Now I went back to follow this guide: https://help.ubuntu.com/community/SettingUpLVM-WithoutACleanInstall
I have lvm2 installed along with fdisk and GParted. But along the way I messed something up and now I have /dev/sda3 which I can't delete:
GParted error:
GParted 0.18.0 --enable-libparted-dmraid --enable-online-resize
Libparted 2.3
Delete /dev/sda3 (lvm2 pv, 1023.00 KiB) from /dev/sda 00:00:00 ( ERROR )
calibrate /dev/sda3 00:00:00 ( SUCCESS )
path: /dev/sda3
start: 39845888
end: 39847933
size: 2046 (1023.00 KiB)
delete lvm2 pv file system 00:00:00 ( ERROR )
lvm pvremove /dev/sda3
Physical Volume /dev/sda3 not found
========================================
First I would like to somehow get rid of this volume. I create a 100MB lvm2 pv
volume just as the guide said, but I don't understand how to get the OS files onto it or even what the point of it is as later on the guide tells you to create ~10gb partitions for your usr folders etc. I'm a little lost and I wish I could just do a clean install.
Edit:
When I do: sudo fdisk /dev/sda3
I get: You must set cylinders.
Edit2:
I managed to delete /dev/sda3 using the following command:
dd if=/dev/zero of=/dev/sda3 bs=1M count=2
and then deleting it using GParted
Now I just need a way to expand /dev/sda1
into the unallocated space
Edit3:
Managed to solve it now, just by playing around with GParted.
You don't need lvm for this. Blow away sda3 and and sda4 to get back to your old setup, and just move sda2 to the right ( unmount sda5 first ), then you can grow sda1 into the unallocated space.
See if you have any logical volume in this physical volume. Try 'sudo lvdisplay'. If yes, remove any logical volume and then try to use 'vgreduce -a' to remove any empty physical volume in the volume group.