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.
- 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)
- List the NFS shares exported on the server. For example:
showmount -e usa-node01
NOTEIf the NFS protocol is v4 only, theshowmount
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
- Set up a mount point for an NFS share. For example:
sudo mkdir /mapr_nfs/
- Mount the cluster using NFS. Use the command as in the following
example:
where mode is one of the following:sudo mount -t nfs -o sec=mode vers=NFS_version usa-node01:/mapr /mapr_nfs/
- 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.
RESTRICTIONYou can use thesec=mode
option only for NFS version 4. NFS version 3 does not support this option.TIPFor the best performance, use NFS v4.0.Use thevers=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/
NOTEThe mount point does not persist after reboot when you mount manually from the command line. - 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)