Configuring the NFSv4 Server
You can configure NFSv4 server by setting the values for the parameters in the
        /opt/mapr/conf/nfs4server.conf file. The configuration parameters are
      defined within blocks in the file. The following sections describe the blocks and required
      parameters (within each block) for the Data Fabric NFSv4
      server.
By default, the NFSv4
      server is configured to rely on a Kerberos infrastructure. If you don't want or don't have a
      Kerberos infrastructure, comment out the SecType parameter of the EXPORT
      section.
- NFS_CORE_PARAM
 - Contains the general settings for the daemon. The parameters in this block should not 
          be modified.
ClusteredThe value is false. Do not modify this parameter.Plugins_DirThe directory for the FSAL libraries. The value is /opt/mapr/lib. Do not modify this parameter.DRC_TCP_SizeThe maximum number of results stored in the DRC. The default value is 16.DRC_TCP_Recycle_Expire_SThe amount of time after which to expire results stored in DRC. The default value is 60seconds.Dirent_Entries_TrackSpecifies whether ( true) or not (false) to monitor dirent entries. Iftrue, the process restarts if the number of dirent entries exceeds limit.Num_Log_FilesThe maximum number of log files. The default value is 1.Max_Logfile_SizeThe maximum amount of space for each log file. The default value is 1073741824. The total amount of disk space for log files is calculated using the following:
For example, supposeNum_Log_Files * Max_LogFile_SizeNum_Log_Files = 32andMax_LogFile_Size = 1GB. Then, the total disk space for log files is 32GB.Enable_RQUOTASpecifies whether ( true) or not (false) to enable support for remote quotas. The default value isfalse.NFS_ProtocolsThe supported NFS protocols. The only supported value is 4. - NFSV4
 - Contains settings for the NFSv4 protocol. The following parameters should not be modified.
Delegationsboolean Specifies whether delegation is supported. The default value is falseand should not be modified (cannot be set totrue) as delegation is not supported.Dirent_Cache_Threshold128 The threshold for caching directory entries. If directory entries exceed threshold, the entries are not cached; caching is enabled only if entries are below this threshold. NOTEThis should be used only ifreaddirplusistrue. - EXPORT_DEFAULTS
 - Contains default values for all subsequent EXPORT blocks. The settings in subsequent 
          EXPORT blocks can override these default values on a per export basis.
Anonymous_UidThe anonymous UID. The default value is -2, which is converted to a 32 bit unsigned integer (4294967294) when root squash is enabled.Anonymous_GidThe anonymous GID. The default value is -2, which is converted to a 32 bit unsigned integer (4294967294) when root squash is enabled.ProtocolsThe supported NFS protocols. The default value is 4. This cannot be changed. - EXPORT
 - Contains settings for exporting a file system.
SecTypeThe comma-separated list of supported authentication flavors for the export or the type of security. Value can be comma-separated list of: - krb5 — authentication
 - krb5i — integrity
 - krb5p — privacy
 
NOTEThis must be specified if you want the clients to use kerberos ticket for secure access.Path(Required) The (cluster) path to export via NFS. The path should have a leading slash. If just /mapris specified as the path, all the clusters (listed in themapr-clusters.conffile) will be visible. To export only a specific cluster, specify the complete path to the cluster to export.NOTEExporting will not be successful if extra forward slash (/) characters are in the path. For example, the following path will not be exported because of the extra slash (shown in bold) in the path:/mapr/Test3//ATS-VOLUMEPseudo(Required for NFSv4 protocol for every directory or volume to export) The pseudo path, which when specified, masks the mount path from the NFS client, for the NFSv4 exports. MapR’s NFSv4 server provides a pseudo-file system where only the exported volumes are visible. This is especially useful in scenarios where one or more volumes in the hierarchy should be hidden and not be visible. When mounting with NFSv4, use the pseudo path. Value can be the volume or directory path. Export_Id(Required) The tag used to set the ID for the export or the unique ID to associate with each export. Value should not be 0. NOTEThe export ID associated with each export must be the same across all NFSv4 servers on the cluster.ClientsThe list of clients these export permissions apply to. Clients may be specified by hostname, IP address, netgroup, CIDR network address, host name wild card, or simply "*" to apply to all clients. SquashSpecifies whether to enable or disable root squashing. By default, root squashing is disabled. If root squash is enabled, the values substituted for the root user will be anonymous user ( Anonymous_UidandAnonymouos_Gid); that is, the UID and GID of a file created will not benfsnobodybecause the default value of -2 is converted to a 32 bit unsigned integer (4294967294) instead of the 16 bit equivalent (65534), which is the value of nfsnobody.Access_Type(Required) The type of access on the mount point. Valid values include: - RO — for read-only mount point
 - RW — for read/write mount point
 - MDONLY — for read/write access to metadata only
 - MDONLY_RO — for read-only access to metadata only
 
FSAL(Required) The file system to use. Value must be MAPR to use the file system libfsalmapr.solibrary, which contains the shared library (libMapRClient) and the callbacks.Attr_Expiration_TimeThe timeout value in seconds for file/directory (regular) attributes cache. This value is used to determine whether to use the cached attribute information (only if within the specified timeout window) or to fetch attribute information again. The default is 3.0 seconds, which specifies that cached attribute information must be considered stale and refreshed after 3.0 seconds. A value of 0 disables caching. For better performance, avoid disabling caching.  - LOG
 - Contains configuration for logging. The default log level is INFO. Value can be one of 
          the following:
- FATAL
 - MAJ
 - CRIT
 - WARN
 - EVENT
 - INFO
 - DEBUG
 - MID_DEBUG
 - FULL_DEBUG
 
 - MAPRFS
 - Contains configurations for NFS gateway access to the Data Fabric file system.
Parameter Default Value Description log_path/opt/mapr/logs/nfs4Path for the log files. ra_sessions5Number of parallel read ahead sessions per client library ( libMapRClient.so). Each open file acts as one read ahead session. For example, if value is set to5, up to5files can have read ahead sessions per client library (libMapRClient.so). To disable read ahead sessions, set value to0.NOTEThe number of client libraries is 3 by default and cannot be configured.flush_inlinetrueSpecifies whether or not to flush all writes inline. Value can be: true— flush all writes inlinefalse— disable inline flushing
fast_local_directiofalseSpecifies whether to optimize or disable NFS client for local direct IO. Value can be: true— optimizefalse— disable
nfs_track_memoryfalseSpecifies whether to enable ( true) or disable (false) memory tracking for NFS.hb_interval5The interval (in seconds) for sending heartbeat to CLDB to allow CLDB to determine whether server is running. The CLDB will declare the NFS gateway dead when it loses about 8 heartbeats in a row and will trigger a failover. req_threshold5The amount of time (in seconds) for processing requests. If the threshold is exceeded, warnings will be logged. client_lib_path/tmp/nfs4The location for the client library ( libMapRClient).NOTETo install and use NFSv4 and FUSE-based POSIX client on the same node, ensure that the path for the client library for the NFSv4 and FUSE-based POSIX client is not/tmp. Specify a different location for the client libraries. For example,/tmp/nfs4lib.readdirplustrueSpecifies whether ( true) or not (false) to enable extended read from the directory. If enabled (true), each entry returns the name, the file ID, attributes (including the field), and file handle. 
NOTE
 - The 
libnfsidmapmust be configured to usensswitch, a translation mechanism for mapping names to IDs, in the/etc/idmapd.conffile. - The NFSv3 (mapr-nfsserver) nodes cannot failover to NFSv4 server nodes and vice versa.
          Ensure that different set of VIPs are assigned for NFSv3 and NFSv4 server nodes. When
          running the 
maprcli virtualip addcommand to set up VIPs, list the MACs of the respective nodes so that the failover works properly (this is necessary if both NFSv3 and NFSv4 are going to be set up for same cluster). The MACs should be mutually exclusive as both NFSv4 and NFSv3 servers cannot run on the same node.