public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: David Riley <d.riley@proxmox.com>
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	[thread overview]
Message-ID: <20260807093657.23649-2-d.riley@proxmox.com> (raw)
In-Reply-To: <20260807093657.23649-1-d.riley@proxmox.com>

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 <d.riley@proxmox.com>
---
 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





  reply	other threads:[~2026-08-07  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  9:36 [PATCH storage 0/2] fix #6050: normalize paths in mount status checks David Riley
2026-08-07  9:36 ` David Riley [this message]
2026-08-07  9:36 ` [PATCH pve-storage 2/2] fix #6050: cifs: normalize share and subdir paths for mount and status David Riley

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=20260807093657.23649-2-d.riley@proxmox.com \
    --to=d.riley@proxmox.com \
    --cc=pve-devel@lists.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