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

Frédéric MASSOT frederic at juliana-multimedia.com
Sun Dec 15 17:20:14 CET 2019


Le 15/12/2019 à 13:13, Michael Rasmussen a écrit :
> On Sun, 15 Dec 2019 12:51:01 +0100
> Frédéric MASSOT <frederic at juliana-multimedia.com> wrote:
> 
>> Le 13/12/2019 à 13:15, Alexandre DERUMIER a écrit :
>>> When a VM sends a discard/trim command, is it sent to the SSD, LVM
>>> does not block the command?
>>>
>>> Hi, yes it's working with lvm (lvm thin only)
>>
>> Hi,
>>
>> I opened a bug report to the debian-installer package to see if it
>> could add lvm-thin support.
>>
> LVM supports discard so there is no need to change to lvm-thin for that
> reason.
> 
>  From lvm.conf:
> "        # Configuration option devices/issue_discards.
>          # Issue discards to PVs that are no longer used by an LV.
>          # Discards are sent to an LV's underlying physical volumes when
> the LV # is no longer using the physical volumes' space, e.g. lvremove,
>          # lvreduce. Discards inform the storage that a region is no
> longer # used. Storage that supports discards advertise the
> protocol-specific # way discards should be issued by the kernel (TRIM,
> UNMAP, or # WRITE SAME with UNMAP bit set). Not all storage will
> support or # benefit from discards, but SSDs and thinly provisioned LUNs
>          # generally do. If enabled, discards will only be issued if
> both the # storage and kernel provide support.
>          issue_discards = 0
> "

Yes, I know this description of the "issue_discards" option.

I find this description incomplete. It is clearly stated that in the 
event of removal or reduction of the logical volume, the discard 
commands are sent. But nothing is said for common operations like 
deleting a file within the logical volume, or a periodic fstrim. It is 
unknown if discard commands are transmitted.

It was this ambiguity that made me open this discussion.


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