On my Windows 7 host, I am using VMware Player to use Ubuntu. I had initially allocated 20GB and now getting Disk space full errrors. So I wanted to extend partition. By searching on forums I saw how to add more disk and used this command to make it 30G -

sudo lvextend -L30G /dev/sda1

But still df command shows that max is 20GB. After more searching it seems that I need to extend partition using gparted. I tried using that but Resize button is disabled. I searched for that and they say that if the partition shows a key image then that partition is active and I cannot change it if it is live. enter image description here

After some more search looks like this can also be fixed by using booting the OS from CD or using gparted boot from cd, boot using iso etc etc without giving any clear instructions. Can someone please guide or post any link which has clear instructions including screenshots for a linux layman as to how I can extend the partition.

  • Did you already increase the HD limit on the actual VM instance through the VMware GUI? I am new so I can't comment yet. ma.ttias.be/…
    – Orlando P.
    Jul 14, 2017 at 5:16

1 Answer 1


You cannot use lvextend as your system doesn't use LVM.

First you resize - in VMWare - the Ubuntu VM's virtual disk to 30 Gb. You did this correctly as I see there's 10 Gb of unallocated space at the end.

You have to boot from a Live CD and use GParted to increase the root partition. You'll have to delete, then recreate, the swap partition /dev/sda2 since it is in the way and the free 10 Gb space is not contiguous with the partition you want to extend.

These are the step-to-step instructions (adapted from this answer):

1) Open GParted

2) Right click on /dev/sda5 and select Swapoff, then right click on /dev/sda2 and select Delete

3) Right click on /dev/sda1, select Resize and specify 29 Gb. (I don't have GParted at hand so these might not be the exact operations for this step, I'm writing by memory)

4) Click on Apply All Operations

5) Open a terminal and run sudo resize2fs /dev/sda1

6) Go back to GParted, open the GParted menu and click on Refresh Devices

7) Right click on the unallocated space and select New

8) Select linux-swap as file system

9) Click on Add

10) Click on Apply All Operations

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .