From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BDCF190FE3 for ; Fri, 10 Mar 2023 10:07:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 98B7D1E375 for ; Fri, 10 Mar 2023 10:06:53 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 10 Mar 2023 10:06:52 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8CA4E426D6 for ; Fri, 10 Mar 2023 10:06:52 +0100 (CET) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Fri, 10 Mar 2023 10:06:48 +0100 Message-Id: <20230310090648.26873-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.253 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH docs] qm: guest trim: add note mentioning issue with ext4 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2023 09:07:23 -0000 It is rather unexpected and seems worth mentioning. Reported in the community forum [0] and the explanation found by Alwin [1]. [0]: https://forum.proxmox.com/threads/123819/ [1]: https://serverfault.com/questions/1113127/fstrim-is-very-slow-on-xfs-and-always-return-same-value-unlike-ext4/1113129#1113129 Signed-off-by: Fiona Ebner --- qm.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qm.adoc b/qm.adoc index bd535a2..3ba2a3c 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1063,6 +1063,12 @@ operations that have the potential to write out zeros to the storage: On a thin provisioned storage, this can help to free up unused space. +NOTE: There is a caveat with ext4 on Linux, because it uses an in-memory +optimization to avoid issuing duplicate TRIM requests. Since the guest doesn't +know about the change in the underlying storage, only the first guest-trim will +run as expected. Subsequent ones, until the next reboot, will only consider +parts of the filesystem that changed since then. + Troubleshooting ^^^^^^^^^^^^^^^ -- 2.30.2