AWS, Cloud Computing

4 Mins Read

A Guide for Setting Up NFS Server and Client on Linux Servers

Voiced by Amazon Polly

Overview

Network File System (NFS) is a distributed file system protocol that allows sharing of files and directories across a network. This setup guide outlines the steps to configure an NFS server and client on Linux servers, enabling the sharing of resources between them. This can be especially useful for scenarios where multiple servers must efficiently access common data or storage resources.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Introduction

Network File System (NFS) is a distributed file system protocol that allows users to access remote files as if they were stored locally. This makes sharing files and folders across a network easy and can be a very efficient way to manage storage resources.

Prerequisites

  • Two Linux or Unix machines: One to act as the NFS server and the other as the NFS client.
  • Administrative access to both the server and client machines.
  • Basic knowledge of the Linux command line.
  • A network connection between the two machines.

Step-by-Step Guide

  1. NFS Server and Client Setup:

To configure NFS, you will need two Linux or Unix machines, one to act as the server and the other as the client.

step1

2. Login to Server

step2

3. Install NFS on Server

step3

  1. Now Enable and Start nfs-server and rpcbind:
  • rpcbind –This service converts Remote Procedure Call (RPC) program numbers to universal addresses. This service helps computers on the network to communicate with each other.

step4

  1. Be sure to enable inbound NFS traffic in the firewall:

If you are using AWS, allow inbound rule NFS to anywhere

step5

Or

step5b

step5c

  1. Now Create NFS Shared Directory

7. Grant NFS clients read, write, and execute permissions on the directory

step7

8. Now, export an NFS share directory

step8

9. Finally, export the filesystem and view the NFS Share

step9

10. Now Login to Client Account

step10

11. Create a mount directory

step11

12. Next, we will attach the NFS share to the mount folder that we just created in the server directory

To make the NFS share permanent, change the file that controls which file systems are mounted at boot

step12

step12b

13. On the server side, upload a file

step13

14. To check that the file is uploaded on the server side

step14

15. Now, finally, check to the client side

step15

Conclusion

We have now finished setting up NFS so that a computer (the client) can access files stored on another computer (the server). We did this by installing the NFS software on both computers, creating a shared directory on the server, and mounting the shared directory on the client. We then tested NFS by accessing a file on the server from the client.

Drop a query if you have any questions regarding NFS and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront Service Delivery PartnerAmazon OpenSearch Service Delivery PartnerAWS DMS Service Delivery PartnerAWS Systems Manager Service Delivery PartnerAmazon RDS Service Delivery PartnerAWS CloudFormation Service Delivery PartnerAWS ConfigAmazon EMR and many more.

FAQs

1. What is NFS?

ANS: – NFS, or Network File System, is a distributed file system protocol that allows users to access files over a network as if they were stored locally. NFS is a popular choice for file sharing between Unix and Linux systems, but it can also be used on other operating systems, such as Windows and macOS.

2. What are the benefits of using NFS?

ANS: – NFS offers several benefits, including:

  • Ease of use: NFS is easy to set up and use. Once the NFS server and client are installed and configured, users can access shared files as if they were stored locally.
  • Transparency: NFS is transparent to users, meaning they do not need to be aware that they are accessing files over a network.
  • Scalability: NFS is scalable to support many users and files.
  • Performance: NFS can provide good performance for most file sharing needs.

3. How do I set up NFS?

ANS: – To set up NFS, you must install the NFS server and client software on both the server and client computers. You must also configure the NFS server to export the directories you want to share. Once the server is configured, you can mount the shared directories on the client computers. For more detailed instructions on how to set up NFS, please see the documentation for your operating system.

WRITTEN BY Noopur Shrivastava

Noopur Shrivastava works as a Research Associate at CloudThat. She is focused on gaining knowledge of the Cloud environment. Noopur loves learning about new technology and trying out different approaches to problem-solving.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!