I have been trying to resize my root partition for several hours now, following multiple guides I found on the Internet.
Installed Ubuntu Server 14.04 on a 8 Gb disk, checked "Use LVM". Then realized that I needed more than 8 Gb.
This is what I have so far:
- I have extended the disk in vCenter
- I have resized /dev/sda2 (extended) and /dev/sda5 (lvm)
- I have booted into the LiveCD and used system-config-lvm to resize the logical root partition to fill /dev/sda properly
Here's my current situation:
~ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/borren--vg-root 6.5G 3.2G 3.1G 52% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 486M 4.0K 486M 1% /dev
tmpfs 100M 672K 99M 1% /run
none 5.0M 4.0K 5.0M 1% /run/lock
none 497M 0 497M 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 38M 186M 17% /boot
~ sudo lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
root borren-vg -wi-ao--- 18.76g
swap_1 borren-vg -wi-ao--- 1020.00m
As you can see, root is still just 8 Gb, but at least my LVM partition is now 20 Gb.
What's the next step?