ubuntulvm

Im trying to add additional space to my virtual machine. I went from 250GB to +750GB but am having trouble adding it to the lvm


Current my pv looks like this

tj@ubuntugis:~$ sudo pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               ubuntu-vg
  PV Size               <31.00 GiB / not usable 1.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              7935
  Free PE               0
  Allocated PE          7935
  PV UUID               pNWjks-FDH8-0XIL-cY6o-bGTm-eF0p-vePw7J

  --- Physical volume ---
  PV Name               /dev/sda4
  VG Name               ubuntu-vg
  PV Size               689.77 GiB / not usable <1.60 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              176582
  Free PE               125383
  Allocated PE          51199
  PV UUID               qJ0Vwp-Ie2N-SJOC-u3O0-3sDc-n4eZ-JdcZYG

So the Physical Volume is the size I expect. The vgdisplay looks like there is quite a bit of space unallocated

tj@ubuntugis:~$  sudo vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               <720.77 GiB
  PE Size               4.00 MiB
  Total PE              184517
  Alloc PE / Size       59134 / 230.99 GiB
  Free  PE / Size       125383 / <489.78 GiB
  VG UUID               CeYabJ-i651-Ts5S-i34k-0VgK-js72-neuNG1

I think my problem is that I extended an existing physical volume instead of creating a new one. Is there an easy way to fix this so I can associated the new 489 GB with ubungu-vg


Solution

  • Curently your VG have those gigabytes, check your screens:

     VG Size               <720.77 GiB
    

    and you have >480GB free

    Free  PE / Size       125383 / <489.78 GiB
    

    If you want to add those gigabytes to logical volume this is another story