NFS: Exporting and Mounting an NFS File System

15 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Regardless of the purpose of a particular server, it needs to store data somewhere. Using network storage allows data to be shared among different users or servers without having to duplicate it and waste storage. In this lab, you’ll be able to practice setting up an NFS server and client.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Set up the NFS server to export the required directory.

First, we need to install the nfs-utils and exportfs packages. Then we can set the mount point up in /etc/exports. After exporting the filesystem, we can start the nfs-server service, and this objective is complete!

Set up the NFS client to mount the required directory on /var/www/html and test.

After installing the nfs-utils package, we need to mount the export on /var/www/html. Once that is complete, we can start the Apache service. Finally, open a browser to the client-server’s public IP and check out the awesome page that you enabled!

Additional Resources

You have just started working at DadCorp, a new startup providing a subscription service that emails dad jokes to customers. The majority of the data center is web servers containing the sign-up forms.

DadCorp's web servers have a lot of duplicated storage and take a lot of time to disperse updates because they all store the website individually. You've been tasked with setting up an NFS server to test the viability of using network storage for the website data.

Set up an NFS export on the server that exports /storage/website to the client. Ensure that the client mounts that export on /var/www/html, start Apache, and ensure the website loads correctly.

If you get stuck, feel free to check out the solution video or the detailed instructions under each objective. Good luck!

Note: The Jump Server is NFS server. On the NFS server, install nfs-utilsand exportfs. On the NFS Client, install nfs-utils on the client.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?