Difference between revisions of "Plugin/webGui/NFS"

From unRAID
< Plugin‎ | webGui
Jump to: navigation, search
 
Line 1: Line 1:
If you are going to export user shares via NFS, then you should create this file on your flash device:
+
When NFS is enabled here, the Tunable (fuse_remember) may be used to alleviate or solve instances of "NFS Stale File Handles" you might encounter with your NFS client.
  
  config/extra.cfg
+
In essence, (fuse_remember) tells an internal subsystem (named "fuse") how long to "remember" or "cache" file and directory information associated with user shares. When an NFS client attempts to access a file (or directory) on the server, and that file (or directory) name is not cached, then you could encounter "stale file handle".
  
Inside this file, put this line:
+
The numeric value of this tunable is the number of seconds to cache file/directory name entries, where the default value of 330 indicates 5 1/2 minutes.  There are two special values you may also set this to:
 +
* 0 which means, do not cache file/directory names at all, and
 +
* -1 which means cache file/directory names forever (or until array is stopped)
  
shfsExtra="-o noforget"
+
A value of 0 would be appropriate if you are enabling NFS but only plan to use it for disk shares, not user shares.
  
This will let user shares work properly with NFS, but memory usage will grow over time by 108 bytes for every file and directory referenced via user share file system.  This is necessary to maintain the NFS file handles that correspond to files accessed via the user share file system and avoid "stale file handle" errors.
+
A value of -1 would be appropriate if no other timeout seems to solve the "stale file handle" on your clientBe aware that setting a value of -1 will cause the memory footprint to grow by approximately 108 bytes per file/directory name cachedDepending how much RAM is installed in your server and how many files/directories you access via NFS this may or may not lead to out-of-memory conditions.
 
 
Another possibility is to put this line in the "extra.cfg" file instead:
 
 
 
  shfsExtra="-o remember=330"
 
 
 
This will cause file handle information to expire from memory after 330 secondsThis may help reduce memory usage, but could still result in "stale file handle" errors being reported by your NFS client, depending on the client.  You may experiment with different values other than 330.
 
 
 
After creating this file, Stop and then Start your array to have changes take effect.
 
 
 
Our recommendation is this.  If you are going to use NFS access with user shares, go ahead and use the "noforget" version, and consider installing a little more memory.  Actually 108 bytes/node is not that great, e.g., 1 million files would require "only" 108MB.  If you are using NFS only with disk shares, or you are not using NFS, do not use the "noforget" or "remember" options at all.
 
 
 
We hope to provide a better solution to this in a future unRAID OS release.
 

Latest revision as of 02:25, 12 June 2013

When NFS is enabled here, the Tunable (fuse_remember) may be used to alleviate or solve instances of "NFS Stale File Handles" you might encounter with your NFS client.

In essence, (fuse_remember) tells an internal subsystem (named "fuse") how long to "remember" or "cache" file and directory information associated with user shares. When an NFS client attempts to access a file (or directory) on the server, and that file (or directory) name is not cached, then you could encounter "stale file handle".

The numeric value of this tunable is the number of seconds to cache file/directory name entries, where the default value of 330 indicates 5 1/2 minutes. There are two special values you may also set this to:

  • 0 which means, do not cache file/directory names at all, and
  • -1 which means cache file/directory names forever (or until array is stopped)

A value of 0 would be appropriate if you are enabling NFS but only plan to use it for disk shares, not user shares.

A value of -1 would be appropriate if no other timeout seems to solve the "stale file handle" on your client. Be aware that setting a value of -1 will cause the memory footprint to grow by approximately 108 bytes per file/directory name cached. Depending how much RAM is installed in your server and how many files/directories you access via NFS this may or may not lead to out-of-memory conditions.