0

I have run out of space in my virtual Ubuntu install, so I doubled the disk in Hyper-V and added 150GB of space. How can I use that unalocated space to extend sda5?

Image of GParted displaying the partitions

  • 1
    First you need to resize (grow) the extended partition. Then, because you're using LVM you need LVM tools to manage the logical volume inside. –  Jan 18 '18 at 16:21
  • I suggest you google resize2fs, pvresize and lvextend (or even lvm basics in general). Some pointers here and here – Robert Riedl Jan 18 '18 at 16:36
  • The resize option is grayed out when I attempt to resize the extended partition.

    I'll look into the google suggestions.

    Why is this so complicated? :(

    – Zachary Poling Jan 18 '18 at 17:02
  • Okay, so I managed to get both partitions into the same VG using vgextend, however the partitions are still separate. Them being seperate is not helpful. After reading up and going through six different guides, I still have not been able to successfully increase the original partition to the full size of the disk. I don't understand what the problem is. – Zachary Poling Jan 19 '18 at 15:23
  • Did you try to force stop of the VM on the host after you have finished? Only rebooting from within the VM is usually not enough to make it realize hardware changes. – derHugo Jan 20 '18 at 11:04
  • After reading your answer I realized the problem has nothing to do with Ubuntu. This is an hyper-v issue solved in Windows. Therefore, I am voting to close this question. – user68186 Jan 20 '18 at 11:37

1 Answers1

-1

Here's the only guide I found that actually worked. No command line commands got me anywhere near what I wanted to do. https://www.itworld.com/article/2833066/virtualization/how-to-extend-a-linux-virtual-machine-partition-in-hyper-v.html

Here's an image of GParted after I was done.

Edit: Well the system itself still only sees it as 150GB when viewing the system details, so my imaging server is only seeing 150GB. I'm glad I don't regularly use Linux. ¯\_(ツ)_/¯

derHugo
  • 3,356
  • 5
  • 31
  • 51