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

Frédéric MASSOT frederic at juliana-multimedia.com
Thu Dec 12 17:00:47 CET 2019


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===



More information about the pve-user mailing list