[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: 16
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: