all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Jakob Klocker" <j.klocker@proxmox.com>
To: "David Riley" <d.riley@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH pve-storage 1/2] fix #6050: nfs: strip trailing slashes from mount status check
Date: Tue, 18 Aug 2026 11:35:21 +0200	[thread overview]
Message-ID: <DKRYU72RMD43.34NSDYWC55E6K@proxmox.com> (raw)
In-Reply-To: <20260807093657.23649-2-d.riley@proxmox.com>

Tested this by adding leading and trailing slashes to the `export` 
property in an NFS storage. Before the patch, the storage was
displayed as inactive, even though it was usable. After the patch 
it shows correctly as active.

Reviewed-by: Jakob Klocker <j.klocker@proxmox.com>
Tested-by: Jakob Klocker <j.klocker@proxmox.com>
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=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";
>  





  reply	other threads:[~2026-08-18  9:35 UTC|newest]

Thread overview: 6+ 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 ` [PATCH pve-storage 1/2] fix #6050: nfs: strip trailing slashes from mount status check David Riley
2026-08-18  9:35   ` Jakob Klocker [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
2026-08-18 10:23   ` Jakob Klocker
2026-08-18 12:33     ` 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=DKRYU72RMD43.34NSDYWC55E6K@proxmox.com \
    --to=j.klocker@proxmox.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal