all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
To: "Lukas Sichert" <l.sichert@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH docs/manager/storage v11 0/6] fix #7339: lvmthick: add option to free storage for deleted VMs
Date: Thu, 30 Jul 2026 16:34:23 +0200	[thread overview]
Message-ID: <DKBZASSXJR3D.2ZYVS2C0ZNS4@proxmox.com> (raw)
In-Reply-To: <20260723135656.102972-1-l.sichert@proxmox.com>

Tested this version using a PVE guest with a disk with discard=1 on a
thin-provisioned LVM storage. I then created a thick-provisioned LVM in
the guest on which I allocated VM disks, wrote data to them, and freed
them under varying settings:

- With `pvesm set sanA --saferemove 1`, the data was
  actually zeroed out and usage actually grew since the disk is fully
  allocated by this
- With `pvesm set sanA --delete saferemove --on-volume-remove
  discard=1`, the previously allocated disk space was reclaimed as
  expected
- I also tried various settings for saferemove-stepsize and
  saferemove_throughput, confirming that the settings are actually
  applied during removal of the volume
- `pvesm set sanA --saferemove 1 --on-volume-remove discard=1` showed
  the data being zeroed-out in the logs and reclaimed the space, but I
  noticed something described in more detail below

On 2/6 I noted that I'm not sure that the data is actually zeroed-out on
the disk with syswrite. I tested this as well as follows:
- pvesm alloc sanc 913 vm-913-disk-0 4G
- Write 4G of a recognizable, super secret string to the disk
- pvesm free sanc:vm-913-disk-0 --> zeroed out the data according to the
  logs
- pvesm alloc sanc 913 vm-913-disk-0 4G
- Read from the disk

The hex dump showed the data still being there after zero-out:

00000000: 4554 2d56 4d2d 4441 5441 2d44 4f2d 4e4f  ET-VM-DATA-DO-NO
00000010: 542d 4c45 414b 0a53 4543 5245 542d 564d  T-LEAK.SECRET-VM
00000020: 2d44 4154 412d 444f 2d4e 4f54 2d4c 4541  -DATA-DO-NOT-LEA

So it seems the data is not actually guaranteed to be zeroed-out, but
the space is reclaimed and the logs suggest that everything worked as
expected. Adding an fsync call as suggested on 2/6 seems to fix this,
the hex dump then looks like this:

00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................

On Thu Jul 23, 2026 at 3:56 PM CEST, Lukas Sichert wrote:
> Logical volumes (LV) in an LVM (thick) volume group (VG) are
> thick-provisioned, but the underlying backing storage can be
> thin-provisioned. In particular, this can be the case if the VG resides
> on a LUN provided by a SAN via iSCSI/FC/SAS [1], where the LUN may be
> thin-provisioned on the SAN side.

[snip]




      parent reply	other threads:[~2026-07-30 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 13:56 [PATCH docs/manager/storage v11 0/6] fix #7339: lvmthick: add option to free storage for deleted VMs Lukas Sichert
2026-07-23 13:56 ` [PATCH storage v11 1/6] lvm: saferemove: keep LVs where zero-out failed for manual zero-out Lukas Sichert
2026-07-23 13:56 ` [PATCH storage v11 2/6] lvm: saferemove: zero out volumes range by range Lukas Sichert
2026-07-29 15:34   ` Michael Köppl
2026-07-23 13:56 ` [PATCH storage v11 3/6] lvm: saferemove: make throughput an integer property Lukas Sichert
2026-07-23 13:56 ` [PATCH storage v11 4/6] fix #7339: lvm: add discard action for removed volumes Lukas Sichert
2026-07-29 15:12   ` Michael Köppl
2026-07-23 13:56 ` [PATCH manager v11 5/6] fix #7339: lvm: add discard-on-remove option to UI Lukas Sichert
2026-07-30 14:36   ` Michael Köppl
2026-07-23 13:56 ` [PATCH docs v11 6/6] fix #7339: lvm: document discard option Lukas Sichert
2026-07-30 14:34 ` Michael Köppl [this message]

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=DKBZASSXJR3D.2ZYVS2C0ZNS4@proxmox.com \
    --to=m.koeppl@proxmox.com \
    --cc=l.sichert@proxmox.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal