all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Lukas Sichert <l.sichert@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH storage v9 1/5] lvm: saferemove: keep LVs where zero-out failed for manual zero-out
Date: Wed, 15 Jul 2026 12:26:01 +0200	[thread overview]
Message-ID: <4e795a64-ab0a-4f7f-a706-7a83e0edfede@proxmox.com> (raw)
In-Reply-To: <20260713160008.121125-2-l.sichert@proxmox.com>

Am 13.07.26 um 6:00 PM schrieb Lukas Sichert:
> Currently even if 'zeroout' fails, the LV is removed and can't be zeroed
> out manually later.
> 
> Let zeroing errors propagate from the secure delete command, and rename
> failed removals to a 'failed-<N>-del-*' LV name instead of immediately
> removing them.
> 
> Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>

with two nits ^^

> @@ -279,6 +282,44 @@ sub lvm_list_volumes {
>      return $lvs;
>  }
>  
> +my sub cleanup_failed_lvm_volume {

Nit: The name could be a bit more telling about what it actually does,
maybe rename_after_failed_{cleanup,delete}()?

> @@ -368,18 +411,33 @@ my sub free_lvm_volumes_locked {
>                  errmsg => "can't refresh LV '$lvmpath' to zero-out its data",
>              );
>  
> -            $secure_delete_cmd->($lvmpath);
> +            eval { $secure_delete_cmd->($lvmpath); };
> +            if (my $cleanup_err = $@) {
> +                my $failed_name =
> +                    eval { cleanup_failed_lvm_volume($class, $scfg, $storeid, $vg, $name) };
> +                if (my $cleanup_failed_err = $@) {
> +                    log_warn(
> +                        "rename failed for '$vg/del-$name' to failed cleanup volume:"

Nit: I'd go with something like "unable to rename '$vg/del-$name' after
failed cleanup:"
This makes it clear that the warning happens after the cleanup error
even though it shows up before that in the log.

> +                            . " $cleanup_failed_err",
> +                    );
> +                    die "cleanup failed for lv $name: $cleanup_err\n";
> +                }
>  




  reply	other threads:[~2026-07-15 10:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 16:00 [PATCH docs/manager/storage v9 0/5] fix #7339: lvmthick: add option to free storage for deleted VMs Lukas Sichert
2026-07-13 16:00 ` [PATCH storage v9 1/5] lvm: saferemove: keep LVs where zero-out failed for manual zero-out Lukas Sichert
2026-07-15 10:26   ` Fiona Ebner [this message]
2026-07-13 16:00 ` [PATCH storage v9 2/5] lvm: saferemove: zero out volumes range by range Lukas Sichert
2026-07-15 10:26   ` Fiona Ebner
2026-07-13 16:00 ` [PATCH storage v9 3/5] fix #7339: lvm: add discard action for removed volumes Lukas Sichert
2026-07-15 10:26   ` Fiona Ebner
2026-07-13 16:00 ` [PATCH manager v9 4/5] fix #7339: lvm: add discard-on-remove option to UI Lukas Sichert
2026-07-15 10:26   ` Fiona Ebner
2026-07-13 16:00 ` [PATCH docs v9 5/5] fix #7339: lvm: document discard option Lukas Sichert
2026-07-15 10:26   ` Fiona Ebner

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=4e795a64-ab0a-4f7f-a706-7a83e0edfede@proxmox.com \
    --to=f.ebner@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