Mounting a directory from one server to another using NFS

MOUNT ServerA to ServerB


Step 1. Check the following service if running in both server

A. Check if nfs daemon is up using command

a. rpcinfo -p or

b. service nfs status

B. Check portmapping

a. service portmap status

C. If both services is down run the following below to start or restart

a. service nfs start or service nfs restart

b. service portmap start or service portmap restart


Step 2. Share ServerA directory

A. Export the directory from ServerA

a. Edit /etc/exports

vi /etc/exports

b. Add the line



Add the directory you want to export or share,add the IP address of ServerB and the option see below:

|—directory—-| |-ServerB-| |———–Option———–|


B. Run command below to update the nfs server.

exportfs -avr

Step 3. Mount the directory to ServerB

A. Edit the fstab

a. vi /etc/fstab

b. Add the line /home/jdante2/ nfs hard,intr 0 0


Add ServerA IP address and directory, add the ServerB directory, type and option see below:

|—–ServerA——————| |—ServerB—-| Type|—Option–| /home/jdante2/ nfs hard,intr 0 0

C. To activate the mount just type command below and press enter

mount -t nfs -a


Step 4. Check if properly mounted

A. Run command below to see status of mounted file

df -h


Mag-iwan ng Tugon

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Baguhin )

Twitter picture

You are commenting using your Twitter account. Log Out / Baguhin )

Facebook photo

You are commenting using your Facebook account. Log Out / Baguhin )

Google+ photo

You are commenting using your Google+ account. Log Out / Baguhin )

Connecting to %s