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 1E8C091176 for ; Fri, 10 Mar 2023 12:40:25 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EA6E9202E7 for ; Fri, 10 Mar 2023 12:39:54 +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 12:39:54 +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 C2ADF446E1; Fri, 10 Mar 2023 12:39:53 +0100 (CET) Message-ID: <4640679a-9b95-0c55-4ede-076e3046e7e8@proxmox.com> Date: Fri, 10 Mar 2023 12:39:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Proxmox VE development discussion , Laurent GUERBY References: <20230310090648.26873-1-f.ebner@proxmox.com> <1678441426.15922.17.camel@guerby.net> From: Fiona Ebner In-Reply-To: <1678441426.15922.17.camel@guerby.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.252 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 NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [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 11:40:25 -0000 Am 10.03.23 um 10:43 schrieb Laurent GUERBY: > On Fri, 2023-03-10 at 10:06 +0100, Fiona Ebner wrote: >> 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 > > Hi, > > Here a workaround proposed by kernel developper when I reported the > issue: > > https://lore.kernel.org/all/1634984680.26818.10.camel@guerby.net/ > "How to force EXT4_MB_GRP_CLEAR_TRIMMED on a live ext4?" > > "My use case is having live migrated a virtual machine root disk from > one storage to another, the target supporting trim, but since fstrim in > the VM post migration does mostly nothing (assumes most space was > trimmed) I cannot release space to the new storage." > (...) > " > Meanwhile other than umount/mount, or actually writing to the dummy > files, > you can try to use fallocate to allocate all the remaining space in the > file system and subsequently removing it. That should be more > efficient, > but don't forget to sync after remove to make sure the space is > released > before you call fstrim." > Hi, while we could mention that workaround, I'm not sure it's not too hacky and filling up (almost) all space is not something I'd like to do in production even if it's just very briefly ;) > > I haven't followed up to see if code was added to deal with this > (tune2fs?) without using fallocate. > Remounting my root partition (even with the 'discard' mount option) in a Debian 11 VM didn't help at least and I don't see anything other than the 'discard' mount option in 'man tune2fs' either (searched for 'trim' and 'discard'). Best Regards, Fiona