Network File System (Nfs); Why Use Nfs; Mounting Nfs File Systems - Red Hat ENTERPRISE LINUX 3 System Administration Manual

Hide thumbs Also See for ENTERPRISE LINUX 3:
Table of Contents

Advertisement

Network File System (NFS)

Network File System (NFS) is a way to share files between machines on a network as if the files
were located on the client's local hard drive. Red Hat Enterprise Linux can be both an NFS server and
an NFS client, which means that it can export file systems to other systems and mount file systems
exported from other machines.

23.1. Why Use NFS?

NFS is useful for sharing directories of files between multiple users on the same network. For example,
a group of users working on the same project can have access to the files for that project using a
shared directory of the NFS file system (commonly known as an NFS share) mounted in the directory
. To access the shared files, the user goes into the
/myproject
There are no passwords to enter or special commands to remember. Users work as if the directory is
on their local machines.

23.2. Mounting NFS File Systems

Use the
command to mount a shared NFS directory from another machine:
mount
mount
shadowman.example.com:/misc/export /misc/local
Warning
The mount point directory on local machine (
In this command,
shadowman.example.com
is the directory that
system on the local machine. After the
sions from the
shadowman.example.com
to display a listing of the files in
/misc/local
23.2.1. Mounting NFS File Systems using
An alternate way to mount an NFS share from another machine is to add a line to the
file. The line must state the hostname of the NFS server, the directory on the server being exported,
and the directory on the local machine where the NFS share is to be mounted. You must be root to
modify the
/etc/fstab
The general syntax for the line in
server:/usr/local/pub
The mount point
/pub
client system, type the command
mounted from the server.
is exporting, and
shadowman
mount
file.
/etc/fstab
/pub
nfs
must exist on the client machine. After adding this line to
mount /pub
/myproject
in the above example) must exist.
/misc/local
is the hostname of the NFS file server,
/misc/local
command runs (and if the client has proper permis-
NFS server) the client user can execute the command
/misc/export
/etc/fstab
is as follows:
rsize=8192,wsize=8192,timeo=14,intr
at a shell prompt, and the mount point
Chapter 23.
directory on his machine.
is the location to mount the file
on
shadowman.example.com
/etc/fstab
/misc/export
ls
.
/etc/fstab
on the
will be
/pub

Advertisement

Table of Contents
loading

Table of Contents