public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Laurent GUERBY <laurent@guerby.net>
Subject: Re: [pve-devel] [PATCH docs] qm: guest trim: add note mentioning issue with ext4
Date: Fri, 10 Mar 2023 12:39:52 +0100	[thread overview]
Message-ID: <4640679a-9b95-0c55-4ede-076e3046e7e8@proxmox.com> (raw)
In-Reply-To: <1678441426.15922.17.camel@guerby.net>

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




  reply	other threads:[~2023-03-10 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  9:06 Fiona Ebner
2023-03-10  9:43 ` Laurent GUERBY
2023-03-10 11:39   ` Fiona Ebner [this message]
2023-03-11 16:58 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4640679a-9b95-0c55-4ede-076e3046e7e8@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=laurent@guerby.net \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal