Mounting NFS Drive via /etc/fstab

Mounting NFS drive is some how simple if you know how to do it. Before you can start mounting the NFS drive, you will need to make sure that the client machine is equipped with all the required component.

Client Machine Preparation

  1. Install nfs component using yum:
    prompt> yum install nfs* -y
  2. Install portmap using yum
    prompt> yum install portmap -y
  3. Make sure that portmap is turned on
    prompt> chkconfig portmap on
    prompt> service portmap start

Your client machine is now ready. The next step you need to do is to configure the client machine to mount the NFS drive.

Configure /etc/fstab

  1. Edit the /etc/fstab file by adding the following new line into it:{nfs_server_ip}:{nfs_dir_path}{/t}{local_dir_path}{\t}nfs{\t}rsize=8192,wsize=8192,timeo=14,acl,intrWhere:
    {nfs_server_ip} : The nfs server ip address
    {nfs_dir_path} : The directory path that NFS server is sharing
    {local_dir_path} : The client machine directory path that you wish to be mounted to
    {\t} : Keyboard input for TAB
  2. Save the changes on the file

Configuration on the FSTAB file is done. Now, it is time to test over your configuration. All you need to do is execute the following command line:

prompt> mount -a
prompt> mount

If the NFS drive is mounted correctly, you will see the mount results. Else, there you will see error when you hit on “mount -a” command.

The common error shows when you try to mount the nfs drive will be :

  1. mount.nfs: Input/output error
    Explain: Portmap service is not started. Start the portmap service will do the trick.
  2. mount: wrong fs type, bad option, bad superblock on
    Explain: nfs is not installed. Make sure that you do install nfs component which stated under the preparation section mentioned above.

For other error, you may check on the logs. The default log file for the nfs mount error is at /var/log/messages


Leave a Reply

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

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

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s


Listens until think alike / voip ipbx


%d bloggers like this: