Mounting NFS on a Linux Client

Explains how to mount NFS on a Linux client either automatically at start up or manually.

You can automatically or manually mount NFS on a Linux client when your system starts up.

Automatically Mount

Use this procedure to automatically mount to NFS on a Linux client when your system starts up.

Add an NFS mount to /etc/fstab.
# device          mountpoint      fs-type      options      dump fsckorder
...
usa-node01:/mapr  /mapr_nfs/         nfs          rw           0    0
...

Manually Mount

Use this procedure to manually mount to NFS on a Linux client.
  1. Install the NFS client.
    • sudo yum install nfs-utils (Red Hat or CentOS)
    • sudo apt-get install nfs-common (Ubuntu)
    • sudo zypper install nfs-client (SLES)
  2. List the NFS shares exported on the server. For example:
    showmount -e usa-node01 
    NOTE
    If the NFS protocol is v4 only, the showmount command does not return the list of exported NFS shares. Instead, to view the export list, run the following command:
    /opt/mapr/server/nfs4mgr list-exports
  3. Set up a mount point for an NFS share. For example:
    sudo mkdir /mapr_nfs/
  4. Mount the cluster using NFS. Use the command as in the following example:
    sudo mount -t nfs -o sec=mode vers=NFS_version usa-node01:/mapr /mapr_nfs/
    where mode is one of the following:
    • krb5 for Kerberos version 5 authentication service.
    • krb5i for Kerberos version 5 with integrity.
    • krb5p for Kerberos version 5 with privacy.
    • none for no authentication.
    and NFS_version is either 3 or 4.
    RESTRICTION
    You can use the sec=mode option only for NFS version 4. NFS version 3 does not support this option.
    TIP
    For the best performance, use NFS v4.0.
    Use the vers=4.0 parameter in the mount command. For example:
    mount -t nfs -o sec=krb5,vers=4.0 usa-node01:/mapr /mapr_nfs/

    For NFS v3, use the command as in the following example:

    mount -t nfs -o vers=3 usa-node01:/mapr /mapr_nfs/
    NOTE
    The mount point does not persist after reboot when you mount manually from the command line.
  5. List all mounted file systems to verify that the cluster is mounted. For example:
    $ mount | grep nfs4
      usa-node01:/mapr on /mapr_nfs (nfs, nodev, nosuid, mounted by testUser)