Learn Linux NFS Mount Options in Detail

April 24, 2012 | By in LINUX HOWTO, NFS
| Reply More

NFS Linux

About NFS (Network File System) And Options to Mount

NFS is a client and server architecture based protocol, developed by Sun Microsystems. The main purpose of this protocol is sharing file/file system over network. In general, files/file system sharing between two UNIX machines. User on client computer access remote file system over a network in manner similar to how local storage accessed.

Here we will discuss, how to access NFS share (exports) from the client.

Assuming that HOST A (NFS Server) running NFS service (rpc.mountd, nfsd, rpc.rquotad). Also you can confirm by executing following command on NFS Server.

[root@localhost ~]# service nfs status
rpc.mountd (pid 2919) is running...
nfsd (pid 2916 2915 2914 2913 2910 2909 2908 2907) is running...
rpc.rquotad (pid 2903) is running...
[root@localhost ~]#

Now login to the HOST B (NFS Client) execute following command, to find out shared directories in the NFS Server.

[root@localhost ~]# showmount -e
Export list for
[root@localhost ~]#

While entering showmount command, you have to specify IP/Hostname (FQDN) of the NFS Server. After getting exported file system information, you can access by the mount command.

[root@localhost ~]# mount -t nfs /data/

Before mounting remote file system, first create mount point, here I have created /data directory and mounted remote file system.


#mount -t vfstype [-o options] NFS Servername:/exporteddirectory /mount point
#mount -t nfs -o options host:/remote/export /local/directory


-t - Option specifies type of the file system that is NFS.
-o intr—this option is used in non reliable network, or network having more network congestion. NFS request will be interrupted when server is not reachable.


[root@localhost ~]# mount -t nfs -o intr /data/
[root@localhost ~]# mount | grep -i intr on /data type nfs (rw,intr,addr=

Hard – if hard option is specified during nfs mount, user cannot terminate the process waiting for NFS communication to resume.


[root@localhost ~]# mount -t nfs -o hard /data/
[root@localhost ~]# mount | grep -i hard on /data type nfs (rw,hard,addr=

Soft- if soft option is specified during nfs mount, user will get error alert when NFS server is not reachable.


[root@localhost ~]# mount -t nfs -o soft /data/
[root@localhost ~]# mount | grep -i soft on /data type nfs (rw,soft,addr=
[root@localhost ~]#

Nfsvers=value-- if this option is specified during nfs mount NFS client uses particular NFS protocol version to communicate.


[root@localhost ~]# mount -t nfs -o nfsvers=3 /data/
[root@localhost ~]# mount | grep -i nfsvers on /data type nfs (rw,nfsvers=3,addr=

Tcp or UDP: As said above, NFS is client and server architecture based protocol and it can be used transport layer as TCP and UDP both depend upon the application requirement.

Example: TCP

[root@localhost ~]# mount -t nfs -o tcp /data/
[root@localhost ~]# mount | grep -i tcp on /data type nfs (rw,tcp,addr=

Example: UDP

[root@localhost ~]# mount -t nfs -o udp /data/
[root@localhost ~]# mount | grep -i udp on /data type nfs (rw,udp,addr=



Share This :

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.