is empty space needed for snapshot backup even in LVM Groups with Local Backing?

mmenaz

Renowned Member
Jun 25, 2009
835
25
93
Northern east Italy
Hi, vgdisplay shows my local default storage have a "hole" of about 4 GB of space left from pv, that I've understood is needed for "snapshot" backups.
Now I've added a LVM group with local backing following the wiki instructions, but I've just realized that there is no space left (vg allocates all the pv available space:
# vgcreate usb-stick /dev/sdb1
is it ok since the "local default storage" 4GB will be used even for VMs stored in the additional lvm storage, or the wiki is missing this important information and I'm in troubles?
If so, will it crash during backup even if in "stop" mode? And in other modes?
Thanks in advance
 
is it ok since the "local default storage" 4GB will be used even for VMs stored in the additional lvm storage, or the wiki is missing this important information and I'm in troubles?

If you create a VG with vgcreate that VG is empty (no LVs at all). So there is enough space for snapshots.
 
Forgive my ignorance, but in "default setup" (once you just have installed proxmox), PV is 4GB larger than the VG it contains. So there is a 4GB outside any VG that, as far as I understand, is used to write data while snapshotting any LV.
If I follow the wiki, I will have a new PV (the new hard disk installed) and with vgcreate it will FILL ALL the available space in the PV, so even if I've no LV in it, there is not such a "outside VG" space that seems is needed by snapshot.
Is that with "default setup" before snapshotting proxmox creates a VG in the 4GB free, a LV in it ad writes data there, and in the case of the additional storage finds that all the space is assigned to a VG and then creates a LV in it for snapshot data?
Please clarify if possible, thanks a lot
 
PV is 4GB larger than the VG it contains.

That is not true:
Code:
# pvs
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sda2  pve  lvm2 a-   929.49G 3.99G
# vgs
  VG   #PV #LV #SN Attr   VSize   VFree
  pve    1   3   0 wz--n- 929.49G 3.99G
As you see, the PV is exactly the same size as the VG.
 
Thanks for the clarification, and after some experiment I've got (I think) the idea. The famous "4GB empty" is just unalloccated space by LV.
But still my question remains.
If I've additional LVM storage, it belongs to a new VG.
Do I have to leave 4GB of unallocated space in that VG also, or in case of snapshot will be used the 4GB of the default (pve) VG?
Put different: does every VG need that empty space?
Thanks a lot