The MapR POSIX Client is implemented by the mapr-loopbacknfs service included in the MapR distribution. The POSIX client allows app servers, web servers, and other client nodes and apps to read and write data directly and securely to a MapR cluster, with transmitted data compressed in both directions.
Starting with the 4.0.2 release, MapR provides single-user
mapr-loopbacknfs licenses that give access to one or more clusters.
The table below summarizes the differences between the basic Linux OS NFS client and the MapR POSIX client:
Linux OS Client
MapR POSIX Client
Installs On Node Type
Access to Cluster
Connection to File System
The Linux OS NFS client must go through an NFS gateway, the link to the gateway is not secured, and transmitted data is not compressed.
The following diagram illustrates how the MapR POSIX client (
mapr-loopbacknfs) works, in comparison with the Linux OS NFS client (left).
The instructions on this page are for the MapR POSIX client. For instructions on setting up NFS on a MapR cluster, see Setting Up MapR NFS.
The table below summarizes the differences in the MapR POSIX client deployment behavior when installed with a MapR cluster where security is disabled or enabled:
Cluster Security Disabled
Cluster Security Enabled
Installing a mapr-loopbacknfs Package on Your Machine
The MapR POSIX client can be installed on any client node, even your laptop, if you have Linux installed. The feature requires a mapr-
loopbacknfs license, which is limited to a single user.
Perform all steps from your client node, except where noted.
mapr-loopbacknfs on your machine, perform the steps below for your version of Linux, as the
root user or as sudo. The package is installed to the
For CentOS or Red Hat
Specifying Environment Variables
A subset of the environment variables defined on the servers for the MapR cluster must be defined, with the same values, on the client. You can add environment variables directly to the startup script, or create a local
env.sh file in
/usr/local/mapr-loopbacknfs/conf. You cannot simply copy the
env.sh file from a server node in the cluster because the
MAPR_HOME setting would be different.
- On a server node in the MapR cluster, locate the
env.shfile in the
- Retrieve the
JAVA_HOMEsettings from the server file and clone them to
/usr/local/mapr-loopbacknfs/conf/env.shon the client node.
- Change the
JAVA_HOMEsetting to point to the location where Java is installed on the client.
Add these lines to the client node
- Save and close the
Copying Configuration Files from a Server Node
Settings in the
mapr-clusters.conf files on server nodes in the MapR cluster are also needed by the POSIX client.
On a server node in the MapR cluster, locate the
mapr-clusters.conffiles in the
Copy both of those files to the
/usr/local/mapr-loopbacknfs/conf/directory on the client machine.
Starting the mapr-loopbacknfs Service to Access a Cluster
The following instructions explain how to start the mapr-loopbacknfs service so you can access either a secure or a non-secure cluster.
Prerequisites for accessing a secure cluster
- Enable security for the cluster. See Enabling and Disabling Security Features on Your Cluster.
- Generate a user ticket. See Generating a MapR User Ticket for instructions. If you do not already have a MapR user ticket, with full control ACL authorization on the cluster, you will have to have a cluster administrator do this for you.
Go to a server node in the MapR cluster to which you want to connect.
Be sure to run
maprlogin passwordto log in first. The user that logs in must be a privileged user, such as the mapr superuser.
maprlogin generateticket -type service -user <user> -duration 365:0:0 -out <file>to generate the user ticket. The <user> for whom the ticket is generated can be any user.
- Copy the user ticket file from the cluster server node where you generated it to the
/usr/local/mapr-loopbacknfs/confdirectory on the client machine where the MapR POSIX client will run.
mapr-loopbacknfs service and mount the volume
Perform the following steps from your client node, except where noted.
mapr-loopbacknfsservice from the command line.
Create a mount point at
/maprand mount the client node to it.
You can also automate the mounting of the volume with every launch of the
mapr-loopbacknfsservice. On the POSIX client node, create
/usr/local/mapr-loopbacknfs/conf/mapr_fstaband add the following line:
Securing the Mountpoint
POSIX permissions are the only limitation on read access by the MapR POSIX client, whether the cluster connected to has security enabled or disabled.
By securing the mountpoint, you can limit access to a single user
On the client system, create /mapr/<clustername>:
Set ownership and permissions
Mount the cluster:
<posix_user> can access the cluster with the POSIX client.
Registering a POSIX Client with Additional Clusters
The first time you start the
loopbacknfs service, you edit the
mapr-loopbacknfs init script by defining the
CLDB_IPS variables, then run the script. These actions update the
However, when you want to register a client with a new cluster or an additional cluster, you must add entries directly to the
/usr/local/mapr-loopbacknfs/conf/mapr-clusters.conf file. Editing the
mapr-loopbacknfs script and restarting the
loopbacknfs service does not update the
Configuring the MapR POSIX Client
The default RPC requests configuration can negatively impact performance and memory. To avoid performance and memory issues, configure the number of outstanding RPC requests to the cluster to be 128.
Perform the following steps as the root user on each POSIX client machine:
Issue the following commands to create the sunrpc.conf file under /etc/modprobe.d with the recommended configuration:
Issue the following echo commands:
This will enable the configuration to take effect after you remount the POSIX client to the MapR cluster.
Remount the POSIX client to the Mapr cluster.
For example, the following commands unmount and mount the NFS assuming that the cluster is mounted at /mapr:
CentOS Troubleshooting Tip
Verifying MapR POSIX Client Licenses
You can check how many MapR POSIX Client licenses are available by clicking on System Settings > Manage Licenses in the navigation pane of the MCS. When the License Management dialog box displays, look under Additional Features to find the number of POSIX Client nodes that can consume a MapR POSIX Client license.
Managing the mapr-loopbacknfs Service
To manually start or stop the service:
To have the service start automatically when the OS starts up:
To monitor the service:
The showmount command displays:
Export list for <host>
Troubleshooting mapr-loopbacknfs Service Issues
To debug authentication issues, follow these steps:
- If you receive a standard error (stderr):
- Make sure
rpcinfo/portmapis installed and/or run service portmap start.
service rpcbind restart.
- Make sure
Examine the log files for error messages:
Error messages in
Refresh User tickets failed as security layer could not be initialized with user ticket /tmp/maprticket_0
exiting: license only allows 10 NFS/mfs server(s), currently alive=10
If you have multiple clusters listed in the
mapr-clusters.conffile on the client, make sure the first one listed is a MapR 4.0.2 or later cluster.
If that is not the problem, you will probably need to purchase additional licenses, or reduce number of installations of the
- Verify that settings in configuration files are correct.
- For all clusters:
- For secure clusters:
- For all clusters:
- Check for “stale” mounts.incremental save for major revision for Bug 17049
mount_local_fs.plscript is not very intelligent, and the initscript wrapper does force unmounts of the mounted file systems.
Always check for stale mounts after stopping the service:
df -kshould return instantly.
umount –f <mount_point>to force the unmount.
Use ps –ef | grep mount_local to confirm that the script is not stuck.