Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stale file handle on NFS mount

Featured Replies

Setup:
UNRAID v.6.8.3

Ubuntu 20.04 client (Pop!OS variant)

Fixed IP on client and server side

NFS share option 192.168.2.10(sec=sys,rw) - this is the IP of the client computer

client's /etc/fstab entry:
192.168.2.17:/mnt/user/MULTIMEDIAS      /home/normand/NFS/NORMAND-NAS-01/MULTIMEDIAS    nfs     defaults,timeo=14,soft 0 0
 

Issue:
It happens with all my shares. I use them, then, at any given (and random) times, I have a "Stale file handle" message and I have to remount the drive to continue working with it. The weirdest part, is that sometimes, a program or process is still writing to the share with no issue but I can't make anything else communicate with it (file manager, other programs). I wait until the process finishes and unmount/remount the drive to continue working...
Is it due to the mounting options I used on the client's side? I am not understanding these NFS parameters well, even after 10 years of linux usage! :P

  • Community Expert

See if turning off hard link support in Settings/Global Share Settings helps, but you'll lose hard link support.

  • Author
On 5/21/2020 at 8:36 AM, johnnie.black said:

See if turning off hard link support in Settings/Global Share Settings helps, but you'll lose hard link support.

What is that Hardlink thing? What does it do?

  • 3 weeks later...

I'm having this problem as well.... I constantly have to `umount` then `mount` the shares after getting stale NFS errors.

  • 8 months later...

Same for me, running UNRAID 6.9.0 and Ubuntu 20.04 in a VM.

I've mounted an UNRAID NFS export in the Ubuntu VM using the /etc/fstab file and the following configuration:

10.10.xxx.yyy:/mnt/user/share /mnt/share nfs rw 0 0

 

Randomly after some time (sometimes after minutes or sometimes after hours) the NFS export is not accessible anymore. When I try to view the mounted content by typing "ls /mnt/share", I get the following error: "ls: cannot access '/mnt/share': Stale file handle"

 

Already disabled "Tunable (support Hard Links)" in "Global Share Settings". Also disabled caching for this particular share where I have got the issue.

 

Anyone find a solution or workaround for this issue already?

  • 2 years later...
On 3/5/2021 at 3:32 PM, Charly said:

Same for me, running UNRAID 6.9.0 and Ubuntu 20.04 in a VM.

I've mounted an UNRAID NFS export in the Ubuntu VM using the /etc/fstab file and the following configuration:

10.10.xxx.yyy:/mnt/user/share /mnt/share nfs rw 0 0

 

Randomly after some time (sometimes after minutes or sometimes after hours) the NFS export is not accessible anymore. When I try to view the mounted content by typing "ls /mnt/share", I get the following error: "ls: cannot access '/mnt/share': Stale file handle"

 

Already disabled "Tunable (support Hard Links)" in "Global Share Settings". Also disabled caching for this particular share where I have got the issue.

 

Anyone find a solution or workaround for this issue already?

I'm having this exact same issue as well with 6.11.5.

Same issue here with 6.11.5.  Any fixes on this?

Same recurring issue with 6.11.5 as well. What are the correct NFS export/mount parameters to avoid this issue?
I have a Synology NAS as well with NFS exports and have never run into this issue. Occurs every day, several times a day with UNRAID.

Edited by Econaut

On 5/25/2023 at 6:35 PM, dlandon said:

Make sure you are using NFSv4.


How do we make sure that it's using NFSv4?
Even though I enabled it in /etc/nfsmount.conf, if looking at the version with "nfsstat -m" it says "vers=3" on Unraid.

1 minute ago, GnaXi said:


How do we make sure that it's using NFSv4?
Even though I enabled it in /etc/nfsmount.conf, if looking at the version with "nfsstat -m" it says "vers=3" on Unraid.

How are you mounting them?  You need to do the following:

  • Use Unraid 6.10 or later for NFSv4 support.
  • Specify NFSv4 in your mount command.  -t 'nfs4'
9 minutes ago, dlandon said:

How are you mounting them?  You need to do the following:

  • Use Unraid 6.10 or later for NFSv4 support.
  • Specify NFSv4 in your mount command.  -t 'nfs4'

I'm mounting a share from Unraid from my virtual Ubuntu.
Even if I use -t nfs4, so that my virtual Ubuntu uses nfsv4, Unraid still insists on using v3.

Just now, GnaXi said:

I'm mounting a share from Unraid from my virtual Ubuntu.

What version of Unraid?  You're mounting an Unraid NFS share from an Ubuntu VM?

Just now, dlandon said:

What version of Unraid?  You're mounting an Unraid NFS share from an Ubuntu VM?

Unraid is Version: 6.11.5
And yes, I am mounting an Unraid share from an Ubuntu VM running on the Unraid server.

37 minutes ago, GnaXi said:

Unraid is Version: 6.11.5
And yes, I am mounting an Unraid share from an Ubuntu VM running on the Unraid server.

Post the Unraid diagnostics.

You're mounting this share on the Unraid server using NFSv3:

May 28 13:34:24 GnaXServer unassigned.devices: Mounting Remote Share '192.168.2.130:/volume1/Andi'...
May 28 13:34:24 GnaXServer unassigned.devices: Mount NFS command: /sbin/mount -t 'nfs' -o rw,noacl '192.168.2.130:/volume1/Andi' '/mnt/remotes/Jabba'
May 28 13:34:24 GnaXServer  nfsrahead[4700]: setting /mnt/remotes/Jabba readahead to 128
May 28 13:34:24 GnaXServer unassigned.devices: Successfully mounted '192.168.2.130:/volume1/Andi' on '/mnt/remotes/Jabba'.

 

You can mount this using MFSv4 by a setting in UD.

Screenshot 2023-05-28 120129.png

 

This is a client mount setting used when mounting NFS shares with UD.

 

NFSv3 is known to have stale file issues with Unraid because of the Mover moving files from a cache to the array.  Several attempts at work arounds are only partially effective.  NTFSv4 is the best solution

24 minutes ago, dlandon said:

You're mounting this share on the Unraid server using NFSv3:

May 28 13:34:24 GnaXServer unassigned.devices: Mounting Remote Share '192.168.2.130:/volume1/Andi'...
May 28 13:34:24 GnaXServer unassigned.devices: Mount NFS command: /sbin/mount -t 'nfs' -o rw,noacl '192.168.2.130:/volume1/Andi' '/mnt/remotes/Jabba'
May 28 13:34:24 GnaXServer  nfsrahead[4700]: setting /mnt/remotes/Jabba readahead to 128
May 28 13:34:24 GnaXServer unassigned.devices: Successfully mounted '192.168.2.130:/volume1/Andi' on '/mnt/remotes/Jabba'.

 

You can mount this using MFSv4 by a setting in UD.

Screenshot 2023-05-28 120129.png

 

This is a client mount setting used when mounting NFS shares with UD.

 

NFSv3 is known to have stale file issues with Unraid because of the Mover moving files from a cache to the array.  Several attempts at work arounds are only partially effective.  NTFSv4 is the best solution

Thanks! Where is that setting located though? Feels like I've looked everywhere at this point :P

32 minutes ago, dlandon said:

UD Settings.

I see! But I'm not using UD for the setup that I'm having issues with.
The NFS share that you referred to earlier is working fine, when Unraid is connecting to a share on a different server.
Issue is the other way around, when a different server is connecting to a share on the Unraid server.

Unraid can serve NFSv4.  I'm not sure what you need to do on the Ubuntu server to make it happen other than specify NFSv4 in the mount.  As I said, NFSv4 is more robust and doesn't have stale file handles issues.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.