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
How To Participate in the Crypto Market With No Money in 2023 | CoinMarketCap
ETF-Entnahmeplan: Monatliche Auszahlungen erreichen
3 Tick Granite Osrs
UPS Paketshop: Filialen & Standorte
Bj 사슴이 분수
Tmf Saul's Investing Discussions
Libiyi Sawsharpener
Cars & Trucks - By Owner near Kissimmee, FL - craigslist
South Carolina defeats Caitlin Clark and Iowa to win national championship and complete perfect season
Craigslist Mexico Cancun
سریال رویای شیرین جوانی قسمت 338
Best Cheap Action Camera
4156303136
Elle Daily Horoscope Virgo
How to watch free movies online
Oscar Nominated Brings Winning Profile to the Kentucky Turf Cup
What is Cyber Big Game Hunting? - CrowdStrike
Stihl Km 131 R Parts Diagram
Price Of Gas At Sam's
Po Box 35691 Canton Oh
Where to Find Scavs in Customs in Escape from Tarkov
Hollywood Bowl Section H
3476405416
Trivago Sf
Self-Service ATMs: Accessibility, Limits, & Features
Jenna Ortega’s Height, Age, Net Worth & Biography
Dragger Games For The Brain
Routing Number For Radiant Credit Union
Munis Self Service Brockton
Rogue Lineage Uber Titles
Craigslist Panama City Beach Fl Pets
1145 Barnett Drive
Delta Township Bsa
Roadtoutopiasweepstakes.con
Wcostream Attack On Titan
Gun Mayhem Watchdocumentaries
2132815089
Carteret County Busted Paper
6576771660
Dickdrainersx Jessica Marie
How To Customise Mii QR Codes in Tomodachi Life?
The Horn Of Plenty Figgerits
Gli italiani buttano sempre più cibo, quasi 7 etti a settimana (a testa)
VerTRIO Comfort MHR 1800 - 3 Standen Elektrische Kachel - Hoog Capaciteit Carbon... | bol
Kushfly Promo Code
4Chan Zelda Totk
Besoldungstabellen | Niedersächsisches Landesamt für Bezüge und Versorgung (NLBV)
Divisadero Florist
How to Get a Check Stub From Money Network
The Ultimate Guide To 5 Movierulz. Com: Exploring The World Of Online Movies
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.