RETURN TO LINUX

Network File System

NFS is a network file system that enables you to mount a network drive as if it was a local drive.

LEGEND

# Precedes the command
Bold The command to be entered
> Precedes the example in the file
Italicized File to be opened
Example Shows either syntax or example

 

On the client

1.   Add the NFS directory as a device in the /etc/fstab file.

2.    #cd /etc

3.    #vi fstab

4.    Place the info for the NFS mount as the last line in the /etc/fstab file. 

SYNTAX

IP:server’s shared directory

client’s mount point -local mount point

file system type -nfs,auto,msdos, vfat,ext2

options -ro(readonly),rw, noauto(mount)

bootable   1=yes 0=no

fsck    1=yes 0=no

EXAMPLE

10.128.33.17:/bin

/loacalbin

nfs

noauto,intr,ro

0

0

In the fstab file:

 >10.128.33.17:/bin  /localbin  nfs  noauto,intr,ro   0 0

On the server

1.    Set permissions in the /etc/exports file.

2.    #cd /etc

3.    #vi exports

Syntax

>directory            hosts allowed(optional)                   access type (ro) or (rw)

Example

>/bin        (ro)

4.  NFSServer daemon must be restarted before clients can access the NFS directory

5.  Start the nfsserver daemon located in /etc/rc.d/init.d

6.  #cd /etc/rc.d/init.d

7.  #./nfsserver restart (command to restart, there is a period before the /)

 

Client without DNS access

Need to add the server to the /etc/hosts file

Syntax

          >IP             Fully qualified domain name           short name

Example

>10.128.33.17      earth.westwood.edu              earth                   

 

Mount the NFS directory

Syntax

          #mount  /mount point (from fstab)

Example

#mount /localbin

 

RETURN TO LINUX