public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Mohamed ALLOUACHE <mohamed.a.allouache@gmail.com>
To: cyruspy@gmail.com
Cc: dnehring@marcant.net, pve-devel@lists.proxmox.com,
	t.lamprecht@proxmox.com
Subject: Re: [RFC] storage: SAN LUN view treats LUNs of third-party plugins as unused, so they can be wiped
Date: Fri, 27 Nov 2026 01:27:25 -0700	[thread overview]
Message-ID: <CAPmm6pNrgUDQS89Ciqhnoe_5Qm34GkbBRkN=vLXbdq3WUjxp4g@mail.gmail.com> (raw)

I have been thinking about possible approaches to make SAN LUN ownership
checks safer.

In addition to the proposed san_volumes() plugin interface, I think there
are a few aspects worth considering:

Explicit ownership states

The core should distinguish between owned, confirmed_unused, and unknown. A
plugin error, timeout, or missing ownership information should never be
interpreted as proof that a LUN is unused.

Cluster-wide ownership information

A registry in pmxcfs could be considered as a complementary mechanism.
Plugins could register volume identities when allocating volumes and update
the records when freeing them. This could help preserve ownership
information even when a plugin cannot currently be queried.

Such a registry would need reconciliation and stale-record handling, so I
would not make it the sole source of truth without further design work.

Destructive-operation locking

Ownership should be checked again immediately before wiping a LUN, under an
appropriate lock shared with volume allocation operations. This would help
avoid TOCTOU races between the ownership check and the actual wipe.

Explicit plugin capabilities

It may also be useful for plugins to declare whether they support SAN
ownership discovery, so the core can distinguish unsupported ownership
checks from a confirmed empty result.

I would suggest starting with the plugin-provided volume list and
fail-closed behavior, while keeping the registry and capability mechanisms
open for discussion.

The important point is that an inability to determine ownership must not be
treated as an unused LUN when performing destructive operations.

Mohamed

             reply	other threads:[~2026-11-27  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  8:27 Mohamed ALLOUACHE [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-24 20:03 [RFC] storage: SAN LUN view treats LUNs of third-party plugins as unused, so they can be wiped Dirk Nehring
2026-11-26 18:39 ` Ciro Iriarte
2026-11-27 18:30   ` 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='CAPmm6pNrgUDQS89Ciqhnoe_5Qm34GkbBRkN=vLXbdq3WUjxp4g@mail.gmail.com' \
    --to=mohamed.a.allouache@gmail.com \
    --cc=cyruspy@gmail.com \
    --cc=dnehring@marcant.net \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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