NFS doesn't remount automatically after turn on or restart the NAS

cc1

New Member
Aug 19, 2016
9
0
1
40
Hi,

I added NFS with the GUI and it works, if I switch off or restart or unplug/plug again the network cable of the NAS , proxmox (4.4.19-1-pve) is not able to remount automatically the NFS and I need to do manually .

So I get this messagge on the log :
Code:
mount.nfs: Stale file handle
or the gui
"unable to activate storage 'NFS-Buffalo' - directory '/mnt/pve/NFS-Buffalo' does not exist (500)"

Manually - same result not working
Code:
mount -o remount /mnt/pve/NFS-Buffalo
mount.nfs: Stale file handle

Manually works
Code:
umount -f /mnt/pve/NFS-Buffalo
mount /mnt/pve/NFS-Buffalo

Any solution ?
 
this is to be expected with NFS - don't use NFS with servers that are not online 24/7
 
Hi fabian,
I had the same problem on proxmox 3.4, after mounting
"unable to activate storage 'Backup' - directory '/mnt/pve/Backup' does not exist (500)"
 
Just run this every minute via crontab:

Code:
#!/bin/bash
list=$(ls /mnt/pve)

for i in $list
do
        status=$(ls /mnt/pve/$i 2>&1)

        if [[ $status =~ .*Stale.* ]]
                then
                umount /mnt/pve/$i
        fi
done


The service "pvestatd" tries to remount every nfs share every 10 seconds automatically.
 
Last edited:
@limone - the umount does the trick, but I'm worried about running this in crontab. Sometimes while this issue is happening, the `ls /mn/pve` appears to take forever. Did you ever have any issues with this?
 
I tryed the script, but
Code:
umount /mnt/pve/Backup
umount: /mnt/pve/Backup: not mounted

Code:
ls /mnt/pve
Backup  Proxmox-Server
 
Last edited:
With Proxmox 8 still throwing NFS errors, I've switched to CIFS. Zero issues.
  • NFS relies on maintaining file and mount handles for consistency, requiring a stable connection to preserve these handles.
  • CIFS/SMB maintains a session-oriented connection that allows for the preservation of client states, such as authentication and file locks, even in the event of connection interruptions.
As such back to @fabian's comment from 2016:
this is to be expected with NFS - don't use NFS with servers that are not online 24/7


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: fabian