From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 62FC41FF0B3 for ; Thu, 26 Nov 2026 19:39:40 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1D32A216FF; Thu, 26 Nov 2026 19:39:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795718370; x=1796323170; darn=lists.proxmox.com; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=euPtRQhsyDEXZzR6ftYtMeje/VXBPpIVf+mgKD24xDk=; b=iK8dCTKjNusFt/ca421Fb1mHctLvB91ulDablri3uhL9cbqMbRf8dpp3roQrlCdgPs hid5zxWDz42mn+bTidq0nMo936xlLCWtn7u6/YAJFOJkDXt/rau1AU7aqfo5vC8FWpTW cNGbOhPUDtJmyJJ3wZ5T7wALJCDgNsNH3sOqLZM6w27pfCoq0hNcguHuHPwUBR1H1u9w fRlQk/tZXoBmDkcQ6+PLe5UePsnf21dkMjWR1kK3GdUPY1MBlGMtVXBRAQTTSlvOCEiV vhy29HV9Vnoh1hKJgq/6Clu5E162I3W7A+R9Fcg9mX0/3QYfyfOj3hBawjxleI88ayR4 Lf0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795718370; x=1796323170; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:subject:cc:to:from:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=euPtRQhsyDEXZzR6ftYtMeje/VXBPpIVf+mgKD24xDk=; b=sEFGStwbYV8Amm6G5i0zjLvHuuIz+wVdP+70aXuTfoeDmiYNIOkLZW5tBzMpwYoKmS q2KffafqH/UX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7eead31-7d7395f4a94mr12486273137.24.1795718370304; Thu, 26 Nov 2026 10:39:30 -0800 (PST) Date: Thu, 26 Nov 2026 15:39:25 -0300 Message-ID: <20261126153925.sanlun-reply@cyruspy.gmail.com> From: Ciro Iriarte To: pve-devel@lists.proxmox.com Subject: Re: [RFC] storage: SAN LUN view treats LUNs of third-party plugins as unused, so they can be wiped In-Reply-To: <20261124200340.380381-1-dnehring@marcant.net> References: <20261124200340.380381-1-dnehring@marcant.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.177 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: GWTOBZWRGWIITT4GABTF7YJI5LDAQ3MH X-Message-ID-Hash: GWTOBZWRGWIITT4GABTF7YJI5LDAQ3MH X-MailFrom: cyruspy@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Dirk Nehring , t.lamprecht@proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 24/11/2026 21:03, Dirk Nehring wrote: > reading the new SAN code in pve-storage (git 2c98567, 9.1.24), I think it > can wipe the disk of a running guest when the disk is a LUN of a > third-party storage plugin. I read SAN.pm on current master and came to the same conclusion. scan_luns() sets used-by-storage only from base, vgname, target and the nvmeof subsysnqn, and assert_lun_unreferenced() checks the same keys. For anything else, the only protection is a writable opener on the node doing the check. I maintain pve-FCLUPlugin, which uses the same layout over Fibre Channel: one array volume per guest disk, currently with a Hitachi VSP driver. It is less exposed than an igroup with every node, because it maps a volume only to the node that activates it and unmaps it on deactivate. A LUN can still stay mapped on a node that no longer has it open. If deactivate fails after a migration or backup, or a node crashes or loses access to the array, the mapping stays in place until cleaned up. On that node, the SAN view shows the disk as unused while the guest runs elsewhere. > or a list form, so that scan_luns() needs one call per storage and not one > per LUN: > > # WWIDs (SCSI) and namespace IDs (NVMe) of the volumes on this storage. > sub san_volumes { my ($class, $storeid, $scfg) = @_; ... } I prefer the list form. The plugin keeps a cluster-wide volume registry in pmxcfs that already records each volume's device identity, so it can answer without querying the array. That matters if the check runs when the GUI lists LUNs. Volumes created for snapshots can be mapped as well, so the list should cover every volume the plugin may map, not just current images. > A die in the method should count as "owned", so that an unreachable array > never makes its LUNs wipeable. Agreed. A related case is a storage whose plugin fails to load, since core cannot query it either. Refusing a wipe whenever such a storage is configured may be too strict, but the dialog could at least warn about it. If that case matters enough, an alternative is for core to keep the WWIDs itself, recorded by the plugin on alloc and free, so the SAN view does not depend on the plugin being reachable at all. If an interface like this is accepted, I'll implement it in pve-FCLUPlugin and test it on our lab cluster (PVE 9.3, FC multipath), including the stale mapping cases above. Ciro