Linux Network File System (NFS) interview questions – The Geek Diary

As a Linux system administrator, having a good understanding of the Linux Network File System (NFS) is essential. NFS allows for the sharing of files and resources between computers and across networks, making it an incredibly valuable asset for any system administrator. If you are applying for a Linux administrator role, preparing answers to common NFS interview questions is a great way to demonstrate your understanding and knowledge of this important system. In this blog post, we will explore the top questions you should be prepared to answer when it comes to Linux Network File System (NFS) interviews. By understanding and preparing for these questions, you can feel confident and ready to answer any questions you are asked during an interview.

Linux NFS(Network File system) Interview Questions & answers
  • Q:1 Why to use NFS ? …
  • Q:3. …
  • Q:6 How to list available nfs share on local machine & remote machine ? …
  • Q:7 What is pNFS ? …
  • Q:8 What is the difference between Hard mount & Soft mount in nfs ? …
  • Q:9 How to check iostat of nfs mount points ?

Linux Popular: NFS Server Interview Questions & Answers Part1

What are NFS Server and RPC Processes

The NFS server and other RPC processes required to respond to requests for shared NFS file systems are launched when the nfs-server service is started. When starting the service, you can use “nfs” instead of “nfs-server.” Example:

This is the user-level implementation of the NFS service’s NFS server process. The main functionality is handled by the nfsd kernel module. Only the types of sockets the kernel server listens on, the NFS versions it supports, and the number of nfsd kernel threads are specified by the user space program. The ps -e command can be used to display the number of active threads.

The /proc/fs/nfsd/threads file specifies how many nfsd threads will be running. In this example, 8 nfsd threads are specified:

Starting the nfs-server service also starts the RPC processes. The ps -e command can be used to show the names of the RPC processes.

The Network Status Monitor (NSM) RPC protocol, which notifies NFS clients when an NFS server restarts without being gracefully brought down, is implemented by this process. This is not used with NFSv4.

This is the NFS mount daemon responsible for implementing the server side of NFSv3 client mount requests. It verifies that the client has access to the requested NFS share and that the NFS server is currently exporting it. For NFSv4, the rpc. Only the NFS server needs the mountd daemon to configure the exports.

In order to map between on-the-wire NFSv4 names (which are strings in the form of user@domain) and local UIDs and GIDs, NFSv4 client and server upcalls are provided. For idmapd to function with NFSv4, /etc/idmapd. conf must be configured. When using NFSv4, this service is necessary, but not when all hosts use the same DNS domain name.

This process provides user quota information for remote users. It doesn’t need user configuration because the nfs service starts it automatically. The output is used by the commands quota and edquota to set and display user quotas for remote file systems, respectively.

This thread in the kernel executes on both clients and servers. It carries out the Network Lock Manager (NLM) protocol, enabling NFSv3 clients to lock server-side files. When the NFS server is running and when an NFS file system is mounted, it automatically starts.

The RPC processes that enable NFS clients to lock files on the server are launched when this service is started.

How to Configure NFS server and NFS client in CentOS/RHEL?

In order to configure NFS server and client computers, please read the posts below.

Root_squash and no_root_squash both work to prevent remote root users from gaining root access. It squashes remote root user privileges. B) Disables root squash, allowing remote root users to gain root access (risky).

ro / rw: a) clients have read-only access to the share when using ro. Clients have read-write access to the share under option (b).

3. Configuration of NFS Clienta. On client, there is no configuration required. We need to make sure if nfs-utils package is installed.

2. Sun Microsystem used NFS V1 for internal operations and experimental purposes. Sun made some changes and released v2 for widespread use after officially releasing v1 only internally.

NFS V4 (December 2000) ==> Performance Improvement ==> Introduced a stateful protocol ==> Developed by IETF i e. Internet Engineering Task force.

What are the Configuration files for NFS server?

The /etc/exports file serves as the foundation for the NFS server’s configuration. You use this file to specify which directories you want to make available to NFS clients. The syntax of this file is:

The name of the directory you want to share (for example, /usr/share/doc) should be used in place of the value of Directory. A client hostname that can be resolved to an IP address should be the value for hostname. To specify how the resource should be shared, use the options value.

For instance, the /etc/exports file entry listed below would allow the NFS client client01 (with the option of read-write access) and the NFS client client02 (with the option of read-only access) to share the /usr/share/doc directory:

Keep in mind that there is no space between the hostname and the option that corresponds to it, but there is a space between the client01 and client02 names.

FAQ

What is NFS in Linux interview questions?

Using a Network File System (NFS), remote computers can mount file systems over a network and use them just like they were locally mounted. System administrators can use the network to consolidate resources onto centralized servers as a result.

What is NFS used for in Linux?

With the help of the network file sharing (NFS) protocol, you can share directories and files with other Linux clients. Typically, a file server running the NFS server component will create shared directories. Files are added by users, who then share them with other users who have access to the folder.

What are three reasons to use NFS?

Benefits of Using NFS NFS has developed over time to support greater security, better file sharing (locking), and better performance (caching). Additionally, it is a network file sharing solution that utilizes the existing internet protocol infrastructure and is reasonably priced and simple to use.

What file system does NFS use?

A method for storing files on a network is the Network File System (NFS). It is a distributed file system that enables users to access files and directories on distant computers and use them just like local ones.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *