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 7D61D1FF0A7 for ; Tue, 18 Aug 2026 11:35:28 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7D1DD21581; Tue, 18 Aug 2026 11:35:26 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 18 Aug 2026 11:35:21 +0200 Message-Id: Subject: Re: [PATCH pve-storage 1/2] fix #6050: nfs: strip trailing slashes from mount status check From: "Jakob Klocker" To: "David Riley" , X-Mailer: aerc 0.20.0 References: <20260807093657.23649-1-d.riley@proxmox.com> <20260807093657.23649-2-d.riley@proxmox.com> In-Reply-To: <20260807093657.23649-2-d.riley@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787045700222 X-SPAM-LEVEL: Spam detection results: 0 AWL 1.789 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: VX564F3AWWRIJLZY2ZOEFQJIIWQKWHOW X-Message-ID-Hash: VX564F3AWWRIJLZY2ZOEFQJIIWQKWHOW X-MailFrom: j.klocker@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: Tested this by adding leading and trailing slashes to the `export`=20 property in an NFS storage. Before the patch, the storage was displayed as inactive, even though it was usable. After the patch=20 it shows correctly as active. Reviewed-by: Jakob Klocker Tested-by: Jakob Klocker On Fri Aug 7, 2026 at 11:36 AM CEST, David Riley wrote: > 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=3D6050 > 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; > =20 > use strict; > use warnings; > + > +use File::Path; > +use File::Spec; > use IO::File; > use Net::IP; > -use File::Path; > =20 > 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) =3D @_; > =20 > + $export =3D File::Spec->canonpath($export); > + > $server =3D "[$server]" if Net::IP::ip_is_ipv6($server); > my $source =3D "$server:$export"; > =20