NFS

This section discusses:

Overview of NFS

The Network Filesystem allows very easy sharing of files between computers. If a computer has "exported" a filesystem to your system (or to everybody) using NFS, you can access the NFS filesystem by typing:

mkdir /mnt1
mount summer:/export_dir /mnt1
Then any time you access files under the /mnt1 directory, you would actually be accessing files on the host summer in its directory export_dir.

To make the summer:/export_dir directory automatically mounted onto the directory export5 when you reboot, you would need to to create the directory /export5 (e.g. mkdir /export5) and then modify your /etc/fstab file to look something like:

# device              mountpoint  fs-type     options    dump   fsck-order
summer:/export_dir    /export5     nfs          rw        0         0

Setting up an NFS server with the GUI

Check to see if you have the NFS GUI software installed by clicking: Start-->Server Settings-->NFS Server. If that menu item is not there, then download and install
redhat-config-nfs software and do the NFS configuration via a graphical user interface through clicking: Start-->Server Settings-->NFS Server

You will then be able to configure the NFS services as shown below and described in more detail here.

NFS server configure example

Setting up an NFS server with the command-line

To give you an idea of what is going on "behind-the-scenes", this section describes how to set up an NFS server using the command-line instead of the GUI.

To "export" the directory /export_dir (to make it available) to a machine named topline, you would create the file /etc/exports with this line:

/export topline(rw)
Then start the NFS server:
/etc/init.d/nfs start
To allow another machine, bottomline, to mount the NFS directory you would change /etc/exports:
/export topline(rw) bottomline(rw)
Then you would tell the NFS server to reread the /export/exports file:
/usr/sbin/exportfs
If you would later like to no longer export any filesystems:
exportfs -uav
Or you could stop the NFS service:
/etc/init.d/nfs stop


Where to get more information

Linux Quick Reference Home
Linux Migration Home