The options that I use for NFS mounts via autofs are "proto=tcp,intr,rw,async" Now create the placeholder directory on the client, mount, and verify it works: ~]# mkdir /dataįilesystem Size Used Avail Use% Mounted on Now start the services: # Ubuntu 12.04 and Ubuntu 14.04Ĭonfirm the NFS clients can see the NFS server: ~]# showmount -e 192.168.1.1 Install the required packages on the NFS clients by: # Ubuntu or Debian Now that the NFS server is ready, the NFS clients now need to be setup to connect. Service nfs-kernel-server start insserv nfs-kernel-serverĬheck to make sure the services are running: ~]# showmount -e Service nfs-common start insserv nfs-common Service nfs-kernel-server start update-rc.d nfs-kernel-server enable Now start the services, and ensure they will start at boot time: # Ubuntu 12.04 and Ubuntu 14.04 ~]# ufw allow in on eth2 to 192.168.1.0/24 proto udpĮxport the directory to be shared, along with its permissions, in /etc/exports: ~]# vim /etc/exports Do not allow this on the public interface without adjusting the source IP’s accordingly! ~]# ufw allow in on eth2 to 192.168.1.0/24 proto tcp You may have to adjust your rules as my private network resides on eth2. Open the firewall to allow your private network access to the NFS services. Set the static port for LOCKD: echo "options lockd nlm_udpport=32769 nlm_tcpport=32803" > /etc/modprobe.d/nfįinally, update the NFS thread count by: vim /etc/default/nfs-kernel-server This step cannot be skipped! # Ubuntu 12.04 and Ubuntu 14.04Ĭonfigure STATD and define the static ports: # Ubuntu 12.04 and Ubuntu 14.04Įcho "manual" > /etc/init/idmapd.override Stop the services so we can unload the lockd kernel module and configure static ports. To make things more easier for admin’s to lock down the firewalls, we are going to set static ports, and also enable 64 NFS threads since you will most likely run into IO problems before you hit this limit as it was meant for much older systems. – Sets random ephemeral ports upon daemon startup. Out of the box, NFSv3 has the following options set which is getting outdated sorely at this time: ~]# apt-get install rpcbind nfs-common nfs-kernel-server Install the required packages on the NFS server: # Ubuntu and Debian As this is a network file system, it is strongly recommended to setup a private switch or private network between to the servers to ensure the lowest latency, as well as better security. Setting it up is pretty easy and straight forward. Some could make the argument that NFSv4.1 is faster now with pNFS that is now available, but I personally still prefer NFSv3 on many environments. As a very mature piece of software, it has been successfully developed and used on production environments for almost 20 years, and it is still widely accepted and supported with a long life ahead of it. ![]() NFSv3 is a tried and tested method of allowing client servers to access files over a network, in a very similar fashion to how the files would be accessed on a local file system. rackspace-monitoring-agent-plugins-contrib.Search Search for: Archives Archives Categories
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |