1

I have Ubuntu as virtual machine guest hosted in esxi server. The Ubuntu disk storage was 5 GB and I wanted to extend the disk up to 30 GB. I extended it via esxi client, and now I see this in Ubuntu terminal

root@linux:/temp# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             5.6G  5.3G   31M 100% /
none                  497M  184K  497M   1% /dev
none                  502M     0  502M   0% /dev/shm
none                  502M  108K  502M   1% /var/run
none                  502M  4.0K  502M   1% /var/lock
none                  502M     0  502M   0% /lib/init/rw

root@linux:/temp# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c70e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         743     5964800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             743        3917    25490433    5  Extended
/dev/sda3               1           1         992+  8e  Linux LVM
Partition 3 does not end on cylinder boundary.
/dev/sda5            2025        3917    15192064   83  Linux

Partition table entries are not in disk order
root@linux:/temp#

How can I extend the sda1 to full 32 GB as showed in fdisk -l output ?

I tried to boot from gparted and can see following

enter image description here

I the sda1 cannot be resized, any help?

0

This is similar to a situation where you have a larger disk, without having a extended the partition to use the available space. You will need to use a disk utility of some sort while /dev/sda1 is unmounted.

I would suggest using an .iso version of Gparted on the host which you can mount as a DVD drive on the Ubuntu guest. Boot the VM into the Gparted disk, with Gparted operating in live mode, and extend /dev/sda1 to fill the available space.

Gparted is a fairly easy to use program, with an intuitive interface but there are detailed instructions on its use here.

  • ok i have updated my original post to attach image, since i cannot add the image in comment reply . please see the gparted image. – Syed Jahanzaib Jul 29 '16 at 11:45
  • Glad you got it sorted, If my answer helped, please mark it as accepted by clicking on the grey tick on the left-hand side. If not, it may be worth deleting your question as it's unlikely to help others. – Arronical Jul 29 '16 at 12:05
  • thx it helped to sort the issue. – Syed Jahanzaib Aug 2 '16 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.