[SOLVED] Can't Use NFS Share

The stale file handle is on the host/node, so that should probably be restarted. You can also remove any stale file handles by creating the following bat file and running it. I have it in cron, running every 5 minutes:

Bash:
#! /bin/bash
list=$(df 2>&1 | grep 'Stale file handle' | awk '{print ""$2"" }' | tr -d \:)
$list
for directory in $list
do
        umount -l "$directory"
        mount -a
done
 
I've self-resolved! In FreeNAS, under the share settings, I experimentally set the mapall users setting to root, which makes anyone using that directory access it with root permissions. The issue then went away, giving me full access to the share. To further lock down the security, I created a "Proxmox" user with write permissions, and mapall-users'd that user to the share. Issue resolved!
Go Sharing > Unix Shares > NFS Path > Edit > Advanced Option > add root instead of only mapall User > Save, Thanks it works
 

Attachments

  • Root Permission.jpg
    Root Permission.jpg
    52.7 KB · Views: 12
I've self-resolved! In FreeNAS, under the share settings, I experimentally set the mapall users setting to root, which makes anyone using that directory access it with root permissions. The issue then went away, giving me full access to the share. To further lock down the security, I created a "Proxmox" user with write permissions, and mapall-users'd that user to the share. Issue resolved!
Thank you
 
On your local machine do
Code:
id $user

Now you see you user name with the id # remember the guid and uid get for me 1000

next you go to proxmox do this enter your uid:guid
Code:
chown 1000:1000 /NFS/share

and next in nano /etc/exports make sure you have

Code:
/NFS/share 192.168.1.0/24(rw,subtree_check,insecure,no_root_squash,anonuid=100,anongid=1000)

last thing on Proxmox
Code:
exportfs -a

Finally mount the NFS back on your local machine.

Code:
sudo mount -t nfs 192.168.1.2:/NFS/share /home/$user/NFS/
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!