I'm running ubuntu (Ubuntu 16.04.1 LTS) under hyper-v and I've extended the hard drive (in hyper-v), but I now need to update ubuntu to use this space.
My current partitions looks as follows:
A lot of the guides I've seen recommend deleting the second partition using fdisk and recreating it, but this appears to delete the sda5 partition and I'm thinking this is probably a very bad idea!
Before:
After:
I'm at a bit of a loss as most searches suggest using a GUI tool which I don't have the luxury of!
I promise I have searched and searched
[EDIT]
After following the great answer below and using parted I now have FDisk showing
However I still don't have the space available
sudo pvs PV VG Fmt Attr PSize PFree /dev/sda5 dar-docker-01-vg lvm2 a-- 126.52g 52.00m
I'm guessing I need to do something again. I've tried using resize2fs but it's likely I'm not using it correctly!
[EDIT 2]
I needed to use
'pvresize /dev/sda5'
then use 'lvdisplay' to get the LV path
Then use 'lvextend -L+150G /dev/dar-docker-01-vg/root'
Finally 'resize2fs -p /dev/dar-docker-01-vg/root'
And after all that df -h shows the full space as available! YAY