Introduction to Network File System

by Mike on November 7, 2008

in NFS Server

On Linux, NFS is a common method of sharing files. It was developed by Sun Microsystems  during the 1980′s.   NFS provides clients the opportunity to access files on a central server.  Using the normal client/server format, the server provides files that are transparently mounted on the clients to allow easy access to the NFS files.  This process is called exporting and is configured on the server through the /etc/exports file.

Uses for NFS
1.Central Server management for users. Using this method the administrator provides a central server that mount user’s home directories in the /home directory.  This enables a central back-up for all user files and eliminates the restrictions of users having important files on computers in another office when they change locations.
2.Central Server management of projects. In some office settings users are spread out throughout the building and yet will need to access project files that will be worked on by others.  The central server provides the file locking and management needed to insure that files are not corrupted by other users.
3.The Terminal Server uses NFS to mount the entire system for diskless computers. This is a fantastic method of employing older hardware for terminals that give fast access to the Linux system.
4.Use NFS to be a central server for rpms needed to update your systems. Here is an example of an idea to create an NFS mount for all of your systems that has all of the needed rpms for your distribution.  Copy all of the rpms to a central server then when you need to add an application or rebuild a computer everything is available and you do not have to look for cds.

Mounts:
The actual file mounts can be mounted read-only (ro) or read-write (rw).  This is defined in the /etc/exports file on the server.

Advantages:
There is no doubt about it, files on a network will need to be shared at some time.  One major advantage that NFS provides is central management.  Using a centrally managed server decreases the workload for the administrator in terms of back-ups, adding software that will be shared and computer repair.  Another advantage is the granularity that can be used to give access to files.  Files may be accessed via IP addresses, groups, users, etc.  NFS allows for a user to log into any machine and have access to their files transparently.

Disadvantages:
Probably the greatest disadvantage is the issue of security.  Because NFS is based on RPC, remote procedure calls, it is inherently insecure and should only be used on a trusted network behind a firewall.  This is not to say that steps can’t be taken to secure NFS but it still will not be ready for the wilds of the open Internet.  Another disadvantage is that you will not want a root account to access an exported file system because of the potential damage. Therefore, the system by default activates “root squashing” to prevent a root account accessing an exported file system.  The “root squashing” can be changed, however.  The other disadvantage that may become evident is the performance limitations on the network.  NFS will slow down during heavy network traffic

Previous post:

Next post: