Expand disk space on Ubuntu 10.04 (VMWare Guest)
Ok, so after much toiling I finally figured out how to do it. And again, gparted cannot be used. Firstly, you should expand the size of the disk in VMWare Workstation. Boot into a livecd and open a root terminal:
We need to create a new primary partition of type LVM out of the free unused space.
#fdisk /dev/sda #Command (m for help): n #Command (m for help): p #Command (m for help): 3 #Command (m for help): w
Reboot the vm into the live cd again
Create the phyisical volume:
Add the new volumn to the group:
#vgextend ubuntu /dev/sda3
Find out how much free space you want to expand to
Check what "Free PE/Size" equals and use that value in the next command
Extend the lvm and grow the file system into the new space
#e2fsck -f /dev/ubuntu/root #lvextend -L +12.6G /dev/ubuntu/root #resize2fs /dev/ubuntu/root
Back up your machine. Boot the system with GParted and grow the partition. Apply the changes.
Related videos on Youtube
Jason Clawson 4 months
I need to resize the disk space of an ubuntu guest in VMWare Workstation. After using the expand disk utility in vmware workstation, I need to do some linux magic to resize the parition. I have searched and found a lot of posts about resizing it. Unfortunately I don't really understand it all that well. Can anyone help me out with this?
[email protected]:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/ubuntu-root 7583436 5678136 1520072 79% / udev 1030884 152 1030732 1% /dev none 1030884 0 1030884 0% /dev/shm none 1030884 72 1030812 1% /var/run none 1030884 0 1030884 0% /var/lock none 1030884 0 1030884 0% /lib/init/rw /dev/sda5 233335 39274 181613 18% /boot .host:/ 244035580 96519316 147516264 40% /mnt/hgfs [email protected]:~# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert root ubuntu -wi-ao 7.35G swap_1 ubuntu -wi-ao 388.00M [email protected]:~# fdisk -l Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0009bea5 Device Boot Start End Blocks Id System /dev/sda1 * 1 1013 8136891 8e Linux LVM /dev/sda2 1014 1044 249007+ 5 Extended /dev/sda5 1014 1044 248976 83 Linux
I really appreciate the help.
Jason Clawson over 12 yearsgparted doesn't work on lvm's. If you look at my post... sda1 is an LVM.
WheresAlice over 12 years+1 that sounds about right, or given this is all virtualised you could have just added a second disk and extended the lvm to that disk.
WheresAlice over 12 years-1 It's running LVM and is virtualised, extending partitions with GParted is not the solution in this case.
s.Daniel about 9 years+1 People who search for things like "vmware ubuntu increase disk size" will come here. The answer is helpful for some of those.