NFS Export Setup Guide for Red Hat and CentOS EC2
This guide covers the steps to set up NFS export to share a directory from a Red Hat or CentOS server running on EC2.
Steps
-
Start a Red Hat or CentOS EC2 instance and check the security group to make sure that the NFS port on this server is open for connection from your NFS client servers.
-
Install NFS server.
$ sudo yum install nfs-utils
-
Mount your objectivefs filesystem (e.g. on /ofs).
$ sudo mount.objectivefs <your filesystem> /ofs
-
In
/etc/exports
, add the following line wheredirectory
is the directory you would like to share andip address
is the ip address of the NFS client machines.
Example to allow the NFS client at 10.0.0.100 to mount<directory> <ip addr>(rw,fsid=<unique id>,no_subtree_check,mp,async)
/ofs
:/ofs 10.0.0.100(rw,fsid=222,no_subtree_check,mp,async)
-
In
/etc/sysconfig/nfs
, increase the number of threads on the NFS server.RPCNFSDCOUNT=<number of threads> # e.g. 64
-
Restart the service.
OR$ sudo /etc/init.d/nfs restart
$ sudo service nfs restart
Reference
by ObjectiveFS staff, January 2, 2017
ObjectiveFS is a shared file system for OS X and Linux that automatically scales and gives you scalable cloud storage. If you have questions or article idea suggestions, please email us at
お問い合わせはこちら