Skip to main content

Resizing an Ubuntu Server Hard Drive within a VMWare Guest OS.

Our hosting company allocated an additional 100GB to our VMWare Ubuntu server. In order to use this newly allocated space we needed to follow the steps below:

First, we checked to see if the newly allocated space was available.
sudo parted /dev/sda print free

The space wasn't showing initially, so we re-scanned the interface.
sudo bash -c 'echo "1" > /sys/class/scsi_disk/2\:0\:0\:0/device/rescan'

sudo parted -- /dev/sda mkpart primary 107GiB -1s

sudo partprobe /dev/sda

sudo pvcreate /dev/sda3

sudo vgdisplay

sudo vgextend midnet1-demo-vg /dev/sda3

sudo lvdisplay

sudo lvextend /dev/midnet1-demo-vg/root /dev/sda3

sudo resize2fs /dev/midnet1-demo-vg/root

df -h

Thanks for the steps: http://innovationsts.com/?p=4884


Comments