[SOLVED] Issue with Space Allocation for Migrated VMs in LVM-thin

jefersonflus

New Member
Aug 11, 2024
3
1
3
Hello!

I have a problem with LVM-thin on my server. I have a cluster with two servers and recently migrated some VMs to the new server. However, the migrated VMs are occupying the entire allocated space instead of dynamically using the space. How can I correct this?
 
Hello and welcome to the Proxmox Community,

please give us a VM config where this applies, which uses the entire space. And the output of
Code:
pvesm status
 
Thank you for the warm welcome.

Attached are the images of the configurations from a VM.
 

Attachments

  • 1723506031576.png
    1723506031576.png
    18.3 KB · Views: 6
  • 1723506072480.png
    1723506072480.png
    21.7 KB · Views: 6
  • 1723506150481.png
    1723506150481.png
    8.9 KB · Views: 5
Thanks for the pictures. Looks like the trim (discard) is not running in the VM.
If you execute
Code:
fstrim -v <mountpoint>
inside your VM... If a lot of being trimmed here, have a look at these docs: https://wiki.archlinux.org/title/Solid_state_drive

  1. Trim is completely disabled
  2. Trim is working with a Timer (for example every one week)
  3. Trim is working in realtime, by adding the "discard" option to a mountpoint in the VM

I would also recommend switching to "VirtIO SCSI single" for the virtual disks if possible. And SCSI for the virtual virtual disks. This is now the default and provides the best performance for Windows and Linux VM's.
 
Last edited: