partitioning - Extending Disk Size - Ubuntu 16.04 - Virtualbox (.VHD) - Windows 10 Host - Ask Ubuntu


i new linux, , virtualbox. running ubuntu 16.04 using virtualbox on windows 10 host. had setup virtual machine use 8 gb, dynamically extendable drive (vhd).

i looking extend size of virtual hard drive now.

here have done far (based on information available on various posts)

  1. ran vboxmanage command
  2. changed storage settings on virtualbox
  3. started ubuntu
  4. opened gparted
  5. the option resize/move partition enabled, on next window, unable increase size (it not allow). please see images below. appreciate if can help!!!

gparted view:

gparted view

gparted resize views:

gparted resize views

a dynamically expanding virtual hard disk 1 in size of .vhd file grows data written virtual hard disk. start out quite small , grow maximum size set. reason can't resize gparted it's dynamic , grows when data added , size curtailed maximum set. since image shows lvm flag on volume, i'm assuming using logical volume manager.

create new partition in unallocated space show in image.

then reboot vm or issue command echo 1 > /sys/class/block/sda/device/rescan tell kernel rescan drive.

determine device name of new partition. use example of /dev/sda6. (change match situation)

to add our lvm configuration first create physical volume using device name determined previously.

pvcreate /dev/sda6

next determine name of volume group issuing command pvdisplay line looks this:

vg name ubuntu-1604

i use ubuntu-1604 in example volume group name. modify necessary match conditions

using info obtained in above process extend our volume group command vgextend vg name device name for example:

vgextend ubuntu1604 /dev/sda6

find logical volume name command lvdisplay

it might be:

lv name /dev/ubuntu-1604/root

now, let's extend logical volume free space available: lvextend -l+100%free /dev/ubuntu-1604/root

finally lets see how did df -h

sources:

lvm howto

expand hard disk lvm


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User