How to: Configure NFS Server and Client on RHEL 7 (2024)

Network File System (NFS) is a distributed file system protocol designed to share files over a computer network. A machine hosting the network drive is called server, where the machines that connect to access the drive are called clients.

NFS relies on Remote Procedure Calls (RPC) for remote communication. RPC services are controlled by the rpcbind service.

  • rpcbind: The rpcbind server converts RPC program numbers into universal addresses.
  • nfs-server: It enables the NFS server and the appropriate RPC processes to service requests for shared NFS file systems.
  • nfs-lock: Enables necessary components allowing NFS clients to lock files on the server.

Two RHEL 7 servers are used in this tutorial, One acting as a server and another as a client.

  • NFS Server — hostname: server.example.com, IP: 192.168.1.100
  • NFS Client — hostname: client.example.com, IP: 192.168.1.101

Yum package manager is used to install nfs-utils package. “nfs-utils” includes all the needed services to build your NFS server.

$ sudo yum install -y nfs-utils

Start the nfs-server and enable to make them bootable on the next reboot

$ sudo systemctl enable rpcbind
$ sudo systemctl start rpcbind
$ sudo systemctl enable nfs-server
$ sudo systemctl start nfs-server

Create a directory for NFS share to share with

$ mkdir /nfs_shared

Edit /etc/exports file

/nfs_shared client.example.com(rw,sync,no_root_squash,no_subtree_check)

where,

/nfs_share – shared directory
client1.example.com – Client address
rw – Writable permission to shared folder
sync – Synchronize shared directory
no_root_squash – Enable root privilege
no_all_squash - Enable user’s authority

The client info client.example.com can be specified in the following formats to control access to multiple clients.

192.168.1.2 - IP address of the client
192.168.1.1/16 - Subnet to specify supported client IP addresses

Run the following command to reflect changes in /etc/exports

exportfs -a

Similar to the server, using yum package manager is used to install nfs-utils package. “nfs-utils” includes necessary client packages to access the remote share.

$ sudo yum install -y nfs-utils

Verify if the client can access the share using “showmount” command

$ showmount -e server.example.comExport list for server.example.com
/nfs_share *
mount -t nfs server.example.com:/nfs_shared /nfs

Create a directory and mount the share

$ mkdir -p /mnt/dir1
$ mount -t nfs server.example.com:/nfs_share /mnt/dir1

Verify the mount using —

$ mount
# or
$ df -h

The directories mounted using “mount” command are not available upon reboots. To persist the mount points, the following entry should be saved to /etc/fstab file

/etc/fstab server.example.com:/nfs_shared /dir1 nfs rsize=8192,wsize=8192,timeo=14,intr

Unmount the share using umount /dir1

Cheers, now we have a successfully configured NFS Server and Client

How to: Configure NFS Server and Client on RHEL 7 (2024)
Top Articles
Broker/in Gehälter in Deutschland 2024
Golden Rake
How To Fix Epson Printer Error Code 0x9e
Asist Liberty
Terrorist Usually Avoid Tourist Locations
El Paso Pet Craigslist
Paris 2024: Kellie Harrington has 'no more mountains' as double Olympic champion retires
Explore Tarot: Your Ultimate Tarot Cheat Sheet for Beginners
Kobold Beast Tribe Guide and Rewards
The Potter Enterprise from Coudersport, Pennsylvania
Aiken County government, school officials promote penny tax in North Augusta
Waive Upgrade Fee
Carter Joseph Hopf
2013 Chevy Cruze Coolant Hose Diagram
Urban Dictionary Fov
1Win - инновационное онлайн-казино и букмекерская контора
Craigslist Pets Sac
2021 Lexus IS for sale - Richardson, TX - craigslist
Craiglist Galveston
Magic Mike's Last Dance Showtimes Near Marcus Cedar Creek Cinema
Dr Adj Redist Cadv Prin Amex Charge
Soccer Zone Discount Code
Vipleaguenba
MyCase Pricing | Start Your 10-Day Free Trial Today
2487872771
What Individuals Need to Know When Raising Money for a Charitable Cause
Soul Eater Resonance Wavelength Tier List
January 8 Jesus Calling
Preggophili
O'reilly's In Monroe Georgia
Lcsc Skyward
Paradise Point Animal Hospital With Veterinarians On-The-Go
Srjc.book Store
Revelry Room Seattle
Amazing Lash Bay Colony
Isablove
FREE Houses! All You Have to Do Is Move Them. - CIRCA Old Houses
Ket2 Schedule
Bismarck Mandan Mugshots
Gets Less Antsy Crossword Clue
8 Ball Pool Unblocked Cool Math Games
Gt500 Forums
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Directions To Cvs Pharmacy
8776725837
Poe Self Chill
Strange World Showtimes Near Century Stadium 25 And Xd
Csgold Uva
3367164101
Kushfly Promo Code
Bbwcumdreams
Latest Posts
Article information

Author: Jonah Leffler

Last Updated:

Views: 6460

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.