8

My recent install of Ubuntu Server 18.04 appears to have created an LV mounted on / that is only 4GB. However the volume group is 160GB as expected.

But I get an insufficient disk space message when I try and expand the LV even though the group appears to have free space:

tom@git:~$ sudo pvs
  PV         VG        Fmt  Attr PSize    PFree
  /dev/vda3  ubuntu-vg lvm2 a--  <159.00g <155.00g
tom@git:~$ sudo vgs
  VG        #PV #LV #SN Attr   VSize    VFree
  ubuntu-vg   1   1   0 wz--n- <159.00g <155.00g
tom@git:~$ sudo lvs
  LV        VG        Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  ubuntu-lv ubuntu-vg -wi-ao---- 4.00g

tom@git:~$ sudo lvextend -L +10G /dev/ubuntu-vg/ubuntu-lv
  /etc/lvm/archive/.lvm_git_20778_346817101: write error failed: No space left on device

Any ideas here? My root filesystem is at 100%, the new installer obviously doesn't make use of all disk space for the primary LV by default.

tomstephens89
  • 981
  • 1
  • 11
  • 23

1 Answers1

9

LVM creates metadata backup on every change. It can't back up the data to /etc/lvm/archive as / is full. Either delete some files and try again, or use the -A n switch to not back up this change.

Reference man lvm (emphasis mine):

-A|--autobackup {y|n}

Whether or not to metadata should be backed up automatically after a change. You are strongly advised not to disable this! See vgcfgbackup(8).

Lenniey
  • 5,090
  • 2
  • 17
  • 28