Corporate Training
Request Demo
Click me
Let's Talk
Request Demo

NFS Interview Questions and Answers

by Mohammed, on May 18, 2018 12:11:29 PM

NFS Interview Questions and Answers

Q1. What is NFS?

Ans: 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.

Q2. Why to use NFS ?

Ans: 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.

Q3. What is the default port of NFS server ?

Ans: By default NFS uses 2049 TCP port.

Q4. Name of the configuration file for NFS server?

Ans: /etc/exports/

Q5. Which SELinux ports Samaba server works?

Ans: Samba_share_t

Q6. What are different versions of NFS Server ?

Ans: 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 64-bit 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.

Q7. What are different options used in /etc/exports file ?

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

  • ro: The directory is shared read only; the client machine will not be able to write to it. This is the default.
  • rw: The client machine will have read and write access to the directory.
  • 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.)
  • 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.
  • 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.
  • 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 nfs-utils versions after 1.0.0.
  • async : Replies to requests before the data is written to disk. This improves performance, but results in lost data if the server goes down.
  • 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
  • wdelay : Negation of no_wdelay , this is default
  • 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.
  • hide : Negation of nohide This is the default

Q8. What is portmap?

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

Q9. What is SWAT?

Ans: Swat is GUI based administration toll for Samba

Q10. What is the difference between Hard mount & Soft mount in nfs ?

Ans: 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.

Q11. What is the roles for NTLM?

Ans: The chanllange/repsonse authentication protocol available to windows clients and server for validating connection request.

Q12. What is nbd daemon?

Ans: This daemon handles all name registration and resolution request .It is the primary vehicle involved in network browsing .It handles all UDP based protocol. The nmbd daemon should be first command to start as a part of the samba start up process.

Q13. On which Ports SAMBA server works?

Ans: UDP port 137 for NetBIOS-ns, NETBIOS name Service
UDP port 138 for netbios-dgm, NetBIOS Datagram service
TCP port 139 for netbios-ssn , NETBIOS session service
TCP port 445 for microsoft-d, Microsoft domain service

Q14. What do you understand by "nfsstat –nfs –server -3" command?

Ans: It will show statistics for NFS version 3 server.

Q15. Can NFS share mounted on Window XP and Justify your answer?

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

Q16. How to check nfs server version ?

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

Q17. How you will check "portmap" service is running or not?

Ans: rpcinfo -p

Q18.  I am unable to mount a NFS share. How will you trace out the reason?

Ans: 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"

Q19.  Can I modify export permissions without needing to remount clients in order to have them take effect?

Ans: Yes. The safest thing to do is edit /etc/exports and run "exportfs -r".

Q20. Is rpc.mountd daemon supports TCP_WRAPPERS?

Ans: 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.

Topics:NFS Interview QuestionsNFS Interview Questions and AnswersInformation Technologies (IT)



Top Courses in Python

Top Courses in Python

We help you to choose the right Python career Path at myTectra. Here are the top courses in Python one can select. Learn More →

aathirai cut mango pickle