To understand the Network File System in Unix, you have to imagine the storage capability of your entire network of computers being turned into one huge hard drive. Remote filesystems are mounted to the root filesystem on an NFS server, and are shared amongst all users on the entire network.

All a user has to do is use the correct file path to access any file on the system, regardless of where that file is actually located. For example, let us suppose you have a filesystem on a computer named "boondocks" that contains a root directory (/), and two sub-directories "boonies" and "nowhere". To the local machine, accessing the drive where these directories are stored, this looks like this:

/
   boonies/
       lost/
   nowhere/
       found/

We can mount the root directory ('/') of "boondocks" to the root directory of the NFS server as /boondocks if we wish. This will look like this on the NFS server when we are done:

/
   etc/
   bin/
   sbin/
   usr/
   boondocks/
       boonies/
          lost/
       nowhere/
          found/

The NFS filesystem uses a client-server architecture, where disk requests are piped to the NFS server, and then shipped out to the appropriate machine containing the actual hard disk. Data is retrieved and delivered directly to the user. The NFS server application is called 'nfsd'. It is launched at bootstrap by one of the run level startup scripts. It is common to launch several copies of this demon to make sure one is available when a user requests access to a file. In addition, the "automount" command is also used to read a configuration file that lists what systems should be mounted on bootstrap. This file is located in either /etc/fstab or /etc/vfstab.

You can check the status of the NFS demons by running "nfsstat".

Just as the local files have permissions, so too do files provided via NFS, and when NFS and NIS are integrated, a very powerful and useful user environment for sharing files securely is created.


Bookmark this page and SHARE:  

Search

Support InetDaemon.Com

Get Tutorials in your INBOX!

Free Training

Free Training