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 552D01FF0F1 for ; Mon, 13 Jul 2026 09:05:14 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E2FF92147B; Mon, 13 Jul 2026 09:05:09 +0200 (CEST) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Subject: [PATCH manager v2 2/2] ceph: osd: stop running pvremove during cleanup Date: Mon, 13 Jul 2026 09:04:32 +0200 Message-ID: <20260713070433.36620-3-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260713070433.36620-1-m.sandoval@proxmox.com> References: <20260713070433.36620-1-m.sandoval@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783926259471 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.340 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low 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: DP7P66G4ROBGA2JWXFP5T3VOTQWLWY4E X-Message-ID-Hash: DP7P66G4ROBGA2JWXFP5T3VOTQWLWY4E X-MailFrom: m.sandoval@proxmox.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 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since [7f007e7fc] ceph will call pvremove while zapping the OSD. Thus we remove our pvremove call in order to avoid failing to remove an already removed PV. The aforementioned commit is included in all versions since Squid which is the oldest supported version in Proxmox VE 9. [7f007e7fc] https://github.com/ceph/ceph/commit/7f007e7fc75b4d6e7465c684f7e5b2458883dcc5 Suggested-by: Fiona Ebner Tested-by: Daniel Herzig Reviewed-by: Kefu Chai Signed-off-by: Maximiliano Sandoval --- PVE/API2/Ceph/OSD.pm | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm index eac913207..f65815641 100644 --- a/PVE/API2/Ceph/OSD.pm +++ b/PVE/API2/Ceph/OSD.pm @@ -1089,20 +1089,6 @@ __PACKAGE__->register_method({ eval { PVE::Ceph::Tools::ceph_volume_zap($osdid, $cleanup) }; warn $@ if $@; - - if ($cleanup) { - # try to remove pvs, but do not fail if it does not work - for my $osd_part (@{ $osd_list->{$osdid} }) { - for my $dev (@{ $osd_part->{devices} }) { - ($dev) = ($dev =~ m|^(/dev/[-_.a-zA-Z0-9\/]+)$|); #untaint - - eval { - run_command(['/sbin/pvremove', $dev], errfunc => sub { }); - }; - warn $@ if $@; - } - } - } } else { my $partitions_to_remove = []; if ($cleanup) { -- 2.47.3