FS#41818 - [lvm2] please consider using the default issue_discards = 1
Attached to Project:
Arch Linux
Opened by need to rename username but can't, guess I'll create a new one then (m4cz3) - Thursday, 04 September 2014, 11:11 GMT
Last edited by freswa (frederik) - Tuesday, 22 September 2020, 11:37 GMT
Opened by need to rename username but can't, guess I'll create a new one then (m4cz3) - Thursday, 04 September 2014, 11:11 GMT
Last edited by freswa (frederik) - Tuesday, 22 September 2020, 11:37 GMT
|
Details
Description:
Hi. maybe /etc/lvm.conf could have (by default) issue_discards = 1 seems safe because it says above: # ... If set # to 1, discards will only be issued if both the storage and kernel provide support. Thanks. Additional info: * package version(s) Name : lvm2 Version : 2.02.109-2 Description : Logical Volume Manager 2 utilities Architecture : x86_64 * config and/or log files etc. # This section allows you to configure which block devices should # be used by the LVM system. devices { .... # Issue discards to a logical volumes's underlying physical volume(s) when # the logical volume is no longer using the physical volumes' space (e.g. # lvremove, lvreduce, etc). Discards inform the storage that a region is # no longer in use. 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 set # to 1, discards will only be issued if both the storage and kernel provide # support. # 1 enables; 0 disables. issue_discards = 0 } Steps to reproduce: pacman -S lvm2 |
This task depends upon
Closed by freswa (frederik)
Tuesday, 22 September 2020, 11:37 GMT
Reason for closing: Won't implement
Additional comments about closing: Upstream says no.
Tuesday, 22 September 2020, 11:37 GMT
Reason for closing: Won't implement
Additional comments about closing: Upstream says no.
issue_discards = 1 is useful on thin provisioned logical volumes (regardless of the underlying disk hardware).
I've also dug up (after the fact, of course) a related Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717313 .
Anyway, for this issue, the resolution is "No distribution should be setting issue_discards to '1' by default - it should be always changed by admin so he is aware of consequences." ( https://www.redhat.com/archives/linux-lvm/2020-September/msg00099.html )
I'm still trying to get some things clarified/stated explicitly so that I can update the wiki.