Configuring the MapR FUSE-Based POSIX Client

The POSIX client configuration values can be set in the /opt/mapr/conf/fuse.conf file. After installing the FUSE-based POSIX client, you can edit the configuration file to define the values for the following parameters and save the file.

To retrieve the list of configuration parameters, run the following command:
/opt/mapr/bin/posix-client-* --help
Here * refers to basic or platinum client package installed on the system. If necessary, set the shared LD_LIBRARY_PATH environment variable to run the help option with the command. For example:
export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79.x86_64/jre/lib/amd64/server/:/opt/mapr/lib
Note: The MapR FUSE-based POSIX clients support only the configuration parameters in the fuse.conf file. All other FUSE configuration parameters are not supported. For more information on the non-mapr configuration parameters, refer to FUSE documentation.
Parameter Default Value Description
fuse.mount.point /mapr (Required) Specifies the mount point where MapR file system must be mounted. Ensure that the specified mount point is empty before starting the service. Once mounted, the POSIX client has access to all the clusters specified in /opt/mapr/conf/mapr-clusters.conf file. The value should not be /mapr if you wish to mask MapR branding.
Note: If NFS server is also running on this node, ensure that the FUSE mount point is different from the NFS server mount point.
fuse.log.path /opt/mapr/logs Specifies the path where the log files must be stored.
fuse.client.lib.path /tmp Specifies the path to where the client libraries must be stored.
Note: To install and use FUSE-based POSIX client and NFSv4 on the same node, ensure that the path for the client library for the FUSE-based POSIX client and NFSv4 is not /tmp, which is the default. Specify a different location for the client libraries. For example, /tmp/fuselib.
fuse.allow.other 1 Allow other users to access the mountpoint. Value can be:
  • 0 - to not allow other users
  • 1 - to allow other users

Set this to 1 only if the service is started by the root user and set to 0 or comment out this parameter if the service is started by a non-root user. If set to 1, also modify the /etc/fuse.conf file to add user_allow_other parameter in the file.

fuse.big.writes 1 Specifies whether to enable writes larger than 4KB. Value can be:
  • 0 - disable
  • 1 - enable
This sets the amount of data/buffer size that can be transferred from the kernel to the FUSE library per request. If enabled, FUSE will allow writes of 128KB from the kernel. If disabled, FUSE will allow writes of 4KB from the kernel.
fuse.affinity 0 (disabled) Specifies whether to enable (1) or disable (0) NUMA affinity. If enabled, sets the NUMA affinity for the POSIX client.
fuse.auto.unmount 1 (enabled) Specifies whether to automatically unmount the filesystem when the process is terminated. Value can be:
  • 0 - disable
  • 1 - enable
fuse.num.libs
  • Basic - 1
  • Platinum - 5
Specifies the number of client libraries to run with. For:
  • Basic client, value must be 1.
  • Platinum client, default value is 5 and can be set to a value greater than 5.
More than one library allows for more than 1GB/sec throughput on remote operations as each additional library increases the throughput by sharding operations across libraries (for parallelism).
Note: Each additional library will consume more memory and CPU.
fuse.ra.sessions
  • Basic - 1
  • Platinum - 5
Specifies the number of parallel read ahead sessions per library. Each open file acts as one read ahead session. For example, for the default value of 5, up to 5 files can have read ahead sessions per library. If value is set to 0, readahead will be disabled.
Note: A greater value will allow more number of parallel read ahead sessions, which is useful if more number of files need to be opened simultaneously. However, note that each additional read ahead session will consume more memory (512K per read ahead session) and threads.
fuse.track.memory false Specifies whether to enable (true) or disable (false) memory tracking for FUSE.
fuse.num.threads 64 Specifies the number of FUSE threads in userspace per mountpoint. A higher number allows parallel processing of multiple operations. Recommended value is only up to 64.
fuse.asyncdirect.io 1 (enabled) Specifies whether to enable asynchronous direct IO. Value can be:
  • 0 - disable
  • 1 - enable
fuse.max.read 128k Specifies the maximum size of read requests.
fuse.max.readahead 128k Specifies the maximum bytes to readahead.
fuse.max.write 128k Specifies the maximum size allowed in a (single) write request.
fuse.sync.read 0 Specifies whether to enable or disable synchronized reads. Value can be:
  • 0 - disable
  • 1 - enable
fuse.max.background 64 Specifies the maximum number of asynchronous requests that can be submitted. IOs submits beyond the maximum limit (specified here) will be blocked.
fuse.congestion.threshold 10 Specifies the kernel’s congestion threshold.
fuse.flush.inline 0 Specifies whether (1) or not (0) to flush all writes inline. Value can be:
  • 0 - disable inline flushing
  • 1 - flush all writes inline
If disabled, for all open files, by default, the buffer is flushed automatically every 3 seconds or when it reaches 64KB. If enabled, writes are sent to server directly.
fuse.fast.local.directio 0 Specifies whether to optimize or disable FUSE client for local direct IO. Value can be:
  • 0 - disable
  • 1 - optimize
fuse.evenly.spread.data 0 Specifies whether (1) or not (0) to evenly spread writes across the nodes on the cluster. If set to 0, which is the default, writes are always sent to the local master node, from where data is replicated on all the other nodes, and if set to 1, writes are distributed across different nodes. Set the value to 1 in case of reduced performance resulting from a large number of writes on the local master node.
fuse.disable.shardcache 0 Specifies whether to disable shard cache, which is a cache of lookups. Value can be:
  • 0 - false
  • 1 - true
If true, more number of lookup calls will be used. The shardcache is used by the FUSE client to ensure that requests for data related to the same file are served by the same library. This is done using hash to improve performance. In very rare circumstances, it might make sense to disable this cache in conjunction with MapR support.
fuse.fsname   Specifies the filesystem source, which is the first field in /etc/mtab file. The default value is the FUSE mountpoint.
fuse.ticketfile.location /opt/mapr/conf/maprfuseticket Specifies the ticket to use to start the service in secure mode. Generate the required ticket and place it in /opt/mapr/conf/<maprfuseticket>.
Note: To support impersonation, provide the mapr user ticket file location or the user’s servicewithimpersonation ticket file location. You can use the mapr user ticket on the server node and service with impersonation ticket on client node. The FUSE service must be started by the root user if servicewithimpersonation ticket is specified. In case of non-impersonated ticket, the ticket credentials becomes the identity for all the requests, no matter which user is accessing the fuse mount point.
See also: Setting up Ticket for POSIX Client.
fuse.nonempty 0 Specifies whether FUSE can be mounted at a non-empty mountpoint (1) or at an empty mountpoint (0). Value can be:
  • 0 - indicates that mount point should be empty
  • 1 - indicates that mount point need not be empty
fuse.xattr.enable 0 (false) Specifies whether (true) or not (false) to enable extended attributes through the FUSE client. Value can be:
  • 0 - false
  • 1 - true
The default value is 0 (false). This is disabled by default because if enabled, during operations, the kernel might make a lot of extended attribute calls for security checks resulting in performance degradation even when there are no extended attributes on the inode. When disabled, extended attributes can still be added using the hadoop fs command; however, this must be enabled to perform any operations on extended attributes using the FUSE-based POSIX client.
Note: Of the five types of extended attribute namespaces in Linux, system, trusted, user, raw, and security, only user namespace is supported. For all other namespaces, EINVAL is returned.
fuse.attr.timeout 3.0 The timeout value in seconds for file/directory (regular) attributes (such as file size, UID, GID, etc., which are normally stored inside the inode) cache. This is used to determine whether to use the cached attribute information (only if within the specified timeout window) or fetch attribute information again. The default is 3.0 second, which specifies that cached attribute information must be considered stale and refreshed after 3.0 second. For this option, it is possible to give fractions of a second as well (for example, fuse.attr.timeout=2.8).

Set the value for this parameter to 0 to compare POSIX (pjd) compliance with ext3/4 filesystem. This disables caching and for better performance, this must be avoided.

fuse.entry.timeout 3.0 The timeout value in seconds for the name lookup cache. This is used to determine whether to use the cached entry for the name lookup (if within the specified timeout window) or lookup name again. The default is 3.0 second, which specifies that cached name lookup information must be considered stale and refreshed after 3.0 second. For this option, it is possible to give fractions of a second as well (for example, fuse.entry.timeout=2.8).

Set the value for this parameter to 0 to compare POSIX (pjd) compliance with ext3/4 filesystem. This disables caching and for better performance, this must be avoided.

fuse.hb.interval 5 Specifies the heartbeat interval (in seconds) for the FUSE-based POSIX client.
fuse.export   Denotes the fully-qualified cluster path to the volume or directory under the mount point.

When this property is not specified, all clusters found in mapr-clusters.conf are mounted under the entity specified by the fuse.mount.point property (/mapr by default). If mapr-clusters.conf contains two clusters A and B, there will be directories /mapr/A and /mapr/B pointing to the root directories of those two clusters.

When this property is specified, it overrides the default behavior, and causes exactly one path from one cluster to be exposed at the entity specified by the fuse.mount.point property. You can either fully expose a single cluster, or expose only a subset of a single cluster.

If fuse.export is set to the name of a cluster, enclosed within /, then that cluster is mounted at /mapr. For example if fuse.export=/A/ , then the path /mapr shows the root directory of cluster A.

If fuse.export is set to a path within a cluster, then /mapr points to that path. For example, if fuse.export=/A/var/, then /mapr displays the directory contents of /var from the MapR cluster A.

Note: The value cannot be the path to a file.
Note: If the value is not a valid path to the name of a volume or directory, the FUSE service will not start.
fuse.enforce.core.pattern false Specifies whether (true) or not (false) to write to /proc/sys/kernel/core_pattern file when the FUSE-based POSIX starts. The default value is false. If true, the core_pattern file contains an /opt/cores/%e.core.%p.%h entry and if false, the file is not touched.
fuse.access.type rw Sets the type of access on the mount point. Value can be:
  • ro — Read only
  • rw — Read and write
The default value is rw.
fuse.auto.inval.data 1 Specifies whether (1) or not (0) to automatically invalidate the kernel FUSE cache for any data change, which causes mtime change, on the files. If set to 1, when the file is read, correct file data is returned. If set to 0, kernel cache of the data, which might not have the most current change, might be returned.
fuse.disable.writeback
  • 1 (v6.0.1)
  • 0 (v6.0)
Specifies whether (1) or not (0) to disable writeback cache. This parameter is applicable only in kernel versions >= 3.15. By default, in kernel versions >= 3.15, writeback is enabled in MapR v6.0 and disabled in MapR v6.0.1. To enable writeback cache, set the value for this parameter to 0. If enabled, the writes are buffered in the kernel. However, when multiple FUSE clients work on the same file, writes to file by one FUSE client might never be seen by other FUSE clients performing a read because the kernel does not update the attributes of the file unless the file is modified locally. You can disable writeback cache to allow the kernel to perform a write through.
fuse.cluster.conf.location /opt/mapr/conf/mapr-clusters.conf The path to the configuration file to use.
fuse.log.debug_level error The FUSE-based posix client log level. Value can be one of the following:
  • fatal
  • error
  • warn
  • info
  • debug
The default value is error.
fuse.use.compressed.inode.format 0 Specifies whether or not to use compressed inode format. When enabled, a 16 bit uniquifier is used to avoid inode cache collisions when multiple clients are modifying (creating, deleting, etc.) the same directories/files.. Value can be one of the following:
  • 0 — (default) do not use compressed inode format
  • 1 — use compressed inode format including uniquifier
Note: Even when set to 1, EBUSY errors are returned if client accesses more than 32k volumes at the same time.

You must start/restart the FUSE-based POSIX client for the changes to take effect. See Starting and Stopping the POSIX Client for more information.

Note:

When you install a patch, the /opt/mapr/conf/fuse.conf.new file contains the new settings. You can copy the new parameters (with default values) to your existing fuse.conf file and restart FUSE for the settings to take effect.

When you upgrade from a prior release, on all supported OS other than Ubuntu, the old fuse.conf file is backed up as fuse.conf.backup, before being overwritten with the new settings. This backup is available in the /opt/mapr/conf directory.

On Ubuntu, the upgrade process does not create a backup copy of the file. You need to manually backup the fuse.conf file before upgrading, as this file is overwritten with the new settings after upgrading.

To continue using FUSE with your custom settings, and take advantage of the new settings, manually copy your custom settings in the fuse.conf.backup file to the fuse.conf file, set custom values for the new parameters in the fuse.conf file where necessary, and restart FUSE for the settings to take effect.

To restart FUSE, use one of the following commands depending on the posix client you use:

  • For posix basic: service mapr-posix-client-basic restart
  • For posix platinum: service mapr-posix-client-platinum restart