NFS Server Interview Questions & Answers

  1. Question 1. How You Will Export Directory (/data) To Host, Allowing Asynchronous Writes Without Adding The Entry In /etc/exports File?

    Answer :

    # exportfs -o async

  2. Question 2. What Is The Role Of “root_squash” Option?

    Answer :

    All requests from the user root are translated or mapped as if they came from the user anonymous (default).

  3. FTP Script Interview Questions

  4. Question 3. Is Rpc.mountd Daemon Supports Tcp_wrappers?

    Answer :

    Yes, The rpc.mountd daemon is protected by the tcp_wrappers. You have to give the clients access to rpc.mountd if they should be allowed to use NFS Server.

  5. Question 4. Explain “nfsstat” Command?

    Answer :

    The nfsstat command displays the statistics about NFS client and NFS server activity.

  6. Apache Pig Tutorial

  7. Question 5. What Is Nfs? What Is Its Purpose?

    Answer :

    NFS is Network File system. It is a file system used for sharing of files over a network. Other resources like printers and storage devices can also be shared. This means that using NFS files can be accessed remotely. Nfs command in linux can be used to achieve this.

    Purpose of NFS:

    • NFS can be used for sharing of files remotely.
    • Data can be stored on a single machine and still remain accessible to others over the network.
    • Reduction of the number of removable media drives throughout the network since they can be shared.
  8. IBM AIX Interview Questions

  9. Question 6. What Is Autofs And Its Advantages?

    Answer :

    • Autofs , is auto mounting filesystem on demand like when ever you need it.
    • NFS is like mounting a complete partition remotely and you will have availability of whole content of the partition.
    • But there are few advantages with autofs over nfs.

    Advantages of AutoFS :

    • Shares are accessed automatically and transparently when a user tries to access any files or directories under the designated mount point of the remote filesystem to be mounted.
    • Booting time is significantly reduced because no mounting is done at boot time.
    • Network access and efficiency are improved by reducing the number of permanently active mount points.
    • Failed mount requests can be reduced by designating alternate servers as the source of a filesystem.
  10. Question 7. What Is The Default Permission Applied On The User When You Mount A Nfs Permission On Any Local Directory In Your System?

    Answer :

    No user permission which is a system account in all the machines having normal user level privileges unless no_root_squash or any other permission specification is not provided on the share

  11. Unix/Linux Tutorial
    DHCP Interview Questions

  12. Question 8. What Is The Difference Between Nfs Share And A Samba Share?

    Answer :

    NFS sharing is done between linux to Linux where Samba sharing can be done between Linux‐Linux and Linux‐windows

  13. Question 9. What Is Hard And Soft Mount In Nfs ?

    Answer :

    In HARD mount :

    • If the NFS file system is hard mounted, the NFS daemons will try repeatedly to contact the server. The NFS daemon retries will not time out, will affect system performance, and you cannot interrupt them
    • If you just mount a file system without specifying hard or soft, the default is a hard mount. Hard mounts are preferable because of the stateless nature of NFS.
    • If a client sends an I/O request to the server (such as an ls -la), and the server gets rebooted, in client machine the process will keep on running. This preserves data transfers in the event of a server failure.

    IN SOFT Mount :

    • A soft mount allows the client to stop trying an operation after a period of time. If the NFS server goes down at the time of data transfer , it will alert and the process will do down. This may cause the data corruption.
    • A soft link will return with an error and fail. you should only use soft mounts in the cases where client responsiveness is more important than data integrity. In another word soft mount will allow automatic unmount if the filesystem is idle for a specified time period.
  14. IBM AIX 7 Administration Interview Questions

  15. Question 10. Explain Nfs Mount Options ?

    Answer :

    Syntax to mount NFS FS:

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

    Mount options explained below :

    • -0 initr : This option is used in non reliable network, or network having more network congestion. NFS request will be interrupted when server is not reachable.
    • -o hard : If hard option is specified during nfs mount, user cannot terminate the process waiting for NFS communication to resume. For ex ..if u ran ls a command on ur NFS mounted directory but that time ur NFS server went down means . The process wont get killed or stopped will wait until the NFS server and mount point become available.
    • -o soft : If soft option is specified during nfs mount, user will get error alert when NFS server is not reachable. This is just inverse of hard mount option. It wont wait for reply if the NFS server went down , it will alert us and the process will go down.
    • -o Nfsvers=value : If this option is specified during nfs mount NFS client uses particular NFS protocol version to communicate.

    For example TCP
    # mount- t nfs -o tcp  /data/
    # mount | grep -i tcp on /data type nfs (rw,tcp,addr=

  16. Question 11. Can I Modify Export Permissions Without Needing To Remount Clients In Order To Have Them Take Effect?

    Answer :

    Yes. The safest thing to do is edit /etc/exports and run “exportfs -r”.

  17. Apache Pig Interview Questions

  18. Question 12. I Am Unable To Mount A Nfs Share. How Will You Trace Out The Reason?

    Answer :

    Firstly, check that you have permissions to mount nfs share or not. Check /etc/exports file.

    Secondly you can get RPC error: Program Not Registered (or another “RPC” error)

    For this check your NFS server and portmap service running or not by “rpcinfo -p”

  19. FTP Script Interview Questions

  20. Question 13. How You Will Check “portmap” Service Is Running Or Not?

    Answer :

    rpcinfo -p

  21. Question 14. What Do You Understand By “nfsstat –nfs –server -3” Command?

    Answer :

    It will show statistics for NFS version 3 server.

  22. Question 15. What Do You Understand By “nfsstat -o All -234” Command?

    Answer :

    • It will Show all information about all versions of NFS.
  23. Samba Server Interview Questions

  24. Question 16. Explain Command “/usr/sbin/exportfs -f”?

    Answer :

    It will flush everything out of the kernels export table. Any clients that are active will get new entries added by mountd when they make their next request.

  25. Question 17. What Is The Role Of “all_squash” Option?

    Answer :

     Treat all client users as anonymous users. Map all user and group IDs to the anonymous user and group ID.

  26. Linux File Systems Interview Questions

  27. Question 18. Which Option Is Used With Exportfs Command To Re-export All Directories?

    Answer :

    exportfs -r

  28. IBM AIX Interview Questions

  29. Question 19. Why To Use Nfs ?

    Answer :

    A Network File System (NFS) allows remote machine to mount file systems over a network and interact with those file systems as though they are mounted locally. This enables system administrators to consolidate resources onto centralized servers over the network.

  30. Question 20. What Is The Default Port Of Nfs Server ?

    Answer :

    By default NFS uses 2049 TCP port.

  31. Ansible (software) Interview Questions

  32. Question 21. What Are Different Versions Of Nfs Server ?

    Answer :

    Currently, there are three versions of NFS. NFS version 2 (NFSv2) is older and widely supported. NFS version 3 (NFSv3) supports safe asynchronous writes and is more robust at error handling than NFSv2; it also supports 64bit file sizes and offsets, allowing clients to access more than 2Gb of file data.

    NFS version 4 (NFSv4) works through firewalls and on the Internet, no longer requires an rpcbind service, supports ACLs, and utilizes stateful operations. Red Hat Enterprise Linux 6.X & Centos 6.X supports NFSv2, NFSv3, and NFSv4 clients. When mounting a file system via NFS, Red Hat Enterprise Linux uses NFSv4 by default, if the server supports it.

  33. Question 22. What Are Configuration Files Of Nfs Server ?

    Answer :

    ‘/etc/exports’ is the main configuration file that controls which file systems are exported to remote hosts and specifies options.

    ‘/etc/sysconfig/nfs‘ is the file through which we can fix ports for RQUOTAD_PORT, MOUNTD_PORT, LOCKD_TCPPORT, LOCKD_UDPPORT and STATD_PORT

  34. Question 23. What Are Different Options Used In /etc/exports File ?

    Answer :

    Below are list of options used in /etc/exports file :

    1. ro: The directory is shared read only; the client machine will not be able to write to it. This is the default.
    2. rw: The client machine will have read and write access to the directory.
    3. root_squash: By default, any file request made by user root on the client machine is treated as if it is made by user nobody on the server. (Exactly which UID the request is mapped to depends on the UID of user “nobody” on the server, not the client.)
    4. no_root_squash : if this option is used , then root on the client machine will have the same level of access to the files on the system as root on the server. This can have serious security implications, although it may be necessary if you want to perform any administrative work on the client machine that involves the exported directories. You should not specify this option without a good reason.
    5. no_subtree_check : If only part of a volume is exported, a routine called subtree checking verifies that a file that is requested from the client is in the appropriate part of the volume. If the entire volume is exported, disabling this check will speed up transfers.
    6. sync : Replies to the NFS request only after all data has been written to disk. This is much safer than async, and is the default in all nfsutils versions after 1.0.0.
    7. async : Replies to requests before the data is written to disk. This improves performance, but results in lost data if the server goes down.
    8. no_wdelay : NFS has an optimization algorithm that delays disk writes if NFS deduces a likelihood of a related write request soon arriving. This saves disk writes and can speed performance
    9. wdelay : Negation of no_wdelay , this is default
    10. nohide : Normally, if a server exports two filesystems one of which is mounted on the other, then the client will have to mount both filesystems explicitly to get access to them. If it just mounts the parent, it will see an empty directory at the place where the other filesystem is mounted. That filesystem is “hidden”. Setting the nohide option on a filesystem causes it not to be hidden, and an appropriately authorised client will be able to move from the parent to that filesystem without noticing the change.
    11. hide : Negation of nohide This is the default
  35. Advanced Linux Interview Questions

  36. Question 24. How To List Available Nfs Share On Local Machine & Remote Machine ?

    Answer :

    • ‘showmount -e localhost’ : Shows the available shares on your local machine
    • ‘showmount -e ‘: Lists the available shares at the remote server
  37. DHCP Interview Questions

  38. Question 25. What Is Pnfs ?

    Answer :

    Parallel NFS (pNFS) as part of the NFS v4.1 standard is available as of Red Hat Enterprise Linux 6.4. The pNFS architecture improves the scalability of NFS, with possible improvements to performance. That is, when a server implements pNFS as well, a client is able to access data through multiple servers concurrently. It supports three storage protocols or layouts: files, objects, and blocks.

  39. Question 26. What Is The Difference Between Hard Mount & Soft Mount In Nfs ?

    Answer :

    Difference between soft mount and hard mount is listed below :

    Soft Mount : Consider we have mounted a NFS share using ‘soft mount’ .When a program or application requests a file from the NFS filesystem, NFS client daemons will try to retrieve the data from the NFS server. But, if it doesn’t get any response from the NFS server (due to any crash or failure of NFS server), the NFS client will report an error to the process on the client machine requesting the file access. The advantage of this mechanism is “fast responsiveness” as it doesn’t wait for the NFS server to respond. But, the main disadvantage of this method is data corruption or loss of data. So, this is not a recommended option to use.

    Hard Mount : Suppose we have mounted the NFS share using hard mount, it will repeatedly retry to contact the server. Once the server is back online the program will continue to execute undisturbed from the state where it was during server crash. We can use the mount option “intr” which allows NFS requests to be interrupted if the server goes down or cannot be reached. Hence the recommended settings are hard and intr options.

  40. Biztalk Server Interview Questions

  41. Question 27. How To Check Iostat Of Nfs Mount Points ?

    Answer :

    Using command ‘nfsiostat‘ we can list iostat of nfs mount points. Use the below command :

    # nfsiostat

    • : specifies the amount of time in seconds between each report. The first report contains statistics for the time since each file system was mounted. Each subsequent report contains statistics collected during the interval since the previous report.
    • : If the parameter is specified, the value of determines the number of reports generated at seconds apart. if the interval parameter is specified without the parameter, the command generates reports continuously.
    • : If one or more names are specified, statistics for only these mount points will be displayed. Otherwise, all NFS mount points on the client are listed.
  42. IBM AIX 7 Administration Interview Questions

  43. Question 28. How To Check Nfs Server Version ?

    Answer :

    ‘nfsstat -o all’ command shows all information about active versions of NFS.

  44. Question 29. What Is Portmap?

    Answer :

    The portmapper keeps a list of what services are running on what ports.

    This list is used by a connecting machine to see what ports it wants to talk to access certain services.

  45. Cisco Network Engineer Interview Questions

  46. Question 30. How To Re Export All The Directories Of ‘/etc/exports’ File ?

    Answer :

    Using the command ‘ exportfs -r’ , we can reexport or refresh entries of  ‘/etc/exports’ file without restarting nfs service

  47. Question 31. How To Mount The Nfs Shared File System In Client?

    Answer :

    To Mount NFS share on the Client use below command :

    # mount -t nfs IP_of_NFS_Server:/NFS_Share_Name   /mount_point

    # mount -t nfs    /mnt/data

  48. Question 32. What Are The Services Required On Nfs Client And Nfs Servers ?

    Answer :

    nfs*, rpcbind*, xinetd*

  49. Dns Server Interview Questions

  50. Question 33. Explain This Entry /shared,rw)?

    Answer :

    Allows all systems with 192.168.1.* IP addresses read-write access to the /shared/ directory:

  51. Apache Pig Interview Questions

  52. Question 34. Is Exported By Nfs Server And I Want To Add This Nfs Share To Client /etc/fstab File. How You Will Add This Entry In /etc/fstab File?

    Answer :

    # device mount-point fs-type options dump fsckorder /mnt nfs rw 0 0

  53. Question 35. What Will Happened If A Space Is Given In Between Allowed_hosts And (options)

    Answer :

    If a space is included, the options are applied to any and all IP addresses, which can be quite dangerous if write permission is granted.

  54. Question 36. What Is “portmap”?

    Answer :

    The portmapper keeps a list of what services are running on what ports. This list is used by a connecting machine to see what ports it wants to talk to access certain services.

  55. Samba Server Interview Questions

  56. Question 37. What Is The Role Of “sync” Option For Nfs Server?

    Answer :

    If sync is specified, the server waits until the request is written to disk before responding to the client. The sync option is recommended because it follows the NFS protocol.

  57. Question 38. What Do You Understand By “nfsstat –nfs –server -3″ Command?

    Answer :

    It will show statistics for NFS version 3 server.

  58. Question 39. Can Nfs Share Mounted On Window Xp And Justify Your Answer?

    Answer :

    No, Window XP operating system doesn’t support nfs protocol.

  59. Question 40. How To Retrieve A List Of Clients Connected To The Nfs Server ?

    Answer :

    To retrieve a list of clients connected to the NFS server, use the showmount command from a shell prompt. To also show the directories the clients are connected to, use the showmount -a command.

  60. Linux File Systems Interview Questions

  61. Question 41. Which Kernel Module Is Used By “rpc.nfsd”?

    Answer :

    nfsd.o kernel module

  62. Question 42. Explain The Working Of Nfs Mount Daemon “rpc.mountd”?

    Answer :

    The rpc.mountd program implements the NFS mount protocol. When receiving a MOUNT request from an NFS client, it checks the request against the list of currently exported file systems. If the client is permitted to mount the file system, rpc.mountd obtains a file handle for requested directory and returns it to the client.

  63. Ansible (software) Interview Questions

  64. Question 43. Name Of Configuration File For Nfs Server ?

    Answer :


  65. Question 44. Explain Option “all_squash”?

    Answer :

    The UID and GID of exported files are mapped to the user anonymous. It is good for public directories.

  66. Question 45. Explain “exportfs” Command?

    Answer :

    The exportfs command is used to maintain the current table of exported file systems for NFS.

  67. Question 46. What Is Meaning Of “no_root_squash” Option ?

    Answer :

    Treat remote root user as local root. Do not map requests from root to the anonymous user and group ID.

  68. Question 47. Explain “soft Mounting” Option At Nfs Client?

    Answer :

    If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. if it cannot be satisfied (for example, the server is down), then it quits. This is called soft mounting.

  69. Question 48. Explain “hard Mounting” Option At Nfs Client?

    Answer :

    If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. if it cannot be satisfied, then it will not quit until the request is satisfied. This is called Hard mounting.

  70. Question 49. What Is Nfs ?

    Answer :

    NFS stands for Network File System. NFS was originally developed by Sun Microsystems in the 1980’s. NFS allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. This enables system administrators to consolidate resources onto centralized servers on the network.

  71. Question 50. Which Nfs Versions Are Available?

    Answer :

    • NFS Version 2
    • NFS Version 3
    • NFS Version 4
  72. Question 51. What Is The Role Of “rmtab” File For Nfs Server?

    Answer :

    For every mount request received from an NFS client, rpc.mountd adds an entry to the /var/lib/nfs/rmtab file.

    When receiving an unmount request, that entry is removed.


  73. Question 52. What Is Different Between Nfs Version 2 & 3 ?

    Answer :

    nfs 2 default 8kb transfer rate,it did not check the authentication at the time connection.client wants to access unauthorized file it shows error messages like “write error”,”read error” nfs 3 32kb transfer rate. It check at the time connection- ACL Support

  74. Question 53. Can We Grant Access By Username And Password For Nfs Share?

    Answer :

    No, access is granted only for IP address.

  75. Question 54. Which Option Is Used With Exportfs Command To Display The Current Export List, Also Displays The List Of Export Options?

    Answer :

    exportfs -v