[PVE-User] Discard transmission between VM / LVM / mdadm layers ?

Gianni Milo gianni.milo22 at gmail.com
Fri Dec 13 06:57:08 CET 2019


All involved layers, from guest OS down to the actual backing storage, must
participate for a successful trim/discard support.

For more information on this have a look at the documentation notes...

https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_hard_disk_discard

Regards,
G.

On Thu, 12 Dec 2019 at 16:01, Frédéric MASSOT <
frederic at juliana-multimedia.com> wrote:

> Hi,
>
> I have a question about the discard/trim transmission between the VM /
> LVM / mdadm layers up to the SSD.
>
> I have a server with four disks mounted in a RAID 10 array with mdadm.
> On this RAID 10 array, there is a volume group with LVM, which contains
> multiple logical volumes for the hypervisor and VMs. fstrim is
> periodically launched on the hypervisor and VMs.
>
> I know that :
> - A VM can pass discard/trim commands to the lower layer if it uses a
> "Virtio SCSI" controller.
> - LVM (since 2.02.85 with issue_discards enabled) can pass discard/trim
> to the lower layer during remove or reduce operations of a logical volume.
> - mdadm supports discard/trim since kernel 3.7.
>
> When a VM sends a discard/trim command, is it sent to the SSD, LVM does
> not block the command?
> Or is it useless, because mdadm handles discard/trim in his own way?
>
>
> Regards.
> --
> ==============================================
> |              FRÉDÉRIC MASSOT               |
> |     http://www.juliana-multimedia.com      |
> |   mailto:frederic at juliana-multimedia.com   |
> | +33.(0)2.97.54.77.94  +33.(0)6.67.19.95.69 |
> ===========================Debian=GNU/Linux===
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>



More information about the pve-user mailing list