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 5540E1FF0E6 for ; Fri, 07 Aug 2026 11:37:34 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 22EB8214F8; Fri, 07 Aug 2026 11:37:34 +0200 (CEST) From: David Riley To: pve-devel@lists.proxmox.com Subject: [PATCH pve-storage 1/2] fix #6050: nfs: strip trailing slashes from mount status check Date: Fri, 7 Aug 2026 11:36:56 +0200 Message-ID: <20260807093657.23649-2-d.riley@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260807093657.23649-1-d.riley@proxmox.com> References: <20260807093657.23649-1-d.riley@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786095435586 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.867 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_MED -2.3 Sender listed at https://www.dnswl.org/, medium 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: E7G4T5TJK7SR2T3WC674T2PSGUTBNHZB X-Message-ID-Hash: E7G4T5TJK7SR2T3WC674T2PSGUTBNHZB X-MailFrom: d.riley@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: Manual edits to the storage configuration bypass strict API validation. If an NFS export path includes a trailing slash, the share mounts successfully but continuously reports as 'inactive' in both the web UI and pvesm status. This occurs because mount status verification compares the configuration string against the entries in /proc/mounts. Normalize the export path by stripping trailing slashes prior to verifying the mount status. Link: https://bugzilla.proxmox.com/show_bug.cgi?id=6050 Signed-off-by: David Riley --- src/PVE/Storage/NFSPlugin.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm index 4cc02c9..6c67848 100644 --- a/src/PVE/Storage/NFSPlugin.pm +++ b/src/PVE/Storage/NFSPlugin.pm @@ -2,9 +2,11 @@ package PVE::Storage::NFSPlugin; use strict; use warnings; + +use File::Path; +use File::Spec; use IO::File; use Net::IP; -use File::Path; use PVE::Network; use PVE::Tools qw(run_command); @@ -19,6 +21,8 @@ use base qw(PVE::Storage::Plugin); sub nfs_is_mounted { my ($server, $export, $mountpoint, $mountdata) = @_; + $export = File::Spec->canonpath($export); + $server = "[$server]" if Net::IP::ip_is_ipv6($server); my $source = "$server:$export"; -- 2.47.3