Study guide

14.1 Mount and Unmount Network File Systems Using NFS

Red Hat Certified System Administrator RHCSA

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts 1.2 Lab Setup & Performance-Based Study Strategy

2 Essential Tools: Shell, Redirection & Text Analysis

2.1 Shell Prompt and Command Syntax 2.2 Input-Output Redirection and Pipes 2.3 grep and Regular Expressions for Text Analysis

3 Essential Tools: Remote Access, Users & Text Editing

3.1 Access Remote Systems Using SSH 3.2 Log In and Switch Users in Multiuser Targets 3.3 Create and Edit Text Files

4 Essential Tools: Files, Links & Archives

4.1 Create, Delete, Copy, and Move Files and Directories 4.2 Hard and Soft Links 4.3 Archive and Compress with tar, gzip, and bzip2

5 Essential Tools: Permissions & System Documentation

5.1 List, Set, and Change Standard ugo/rwx Permissions 5.2 System Documentation: man, info, and /usr/share/doc

6 Manage Software: RPM and Flatpak

6.1 Configure Access to RPM Repositories 6.2 Install and Remove RPM Software Packages 6.3 Configure Access to Flatpak Repositories 6.4 Install and Remove Flatpak Software Packages

7 Create Simple Shell Scripts

7.1 Conditional Execution: if, test, and [] 7.2 Looping Constructs for Files and Input 7.3 Process Script Inputs ($1, $2, and Beyond) 7.4 Process Shell Command Output in Scripts

8 Operate Running Systems: Boot and Recovery

8.1 Boot, Reboot, and Shut Down a System Normally 8.2 Boot Systems into Different Targets Manually 8.3 Interrupt the Boot Process to Gain Access

9 Operate Running Systems: Processes and Tuning

9.1 Identify and Kill CPU/Memory Intensive Processes 9.2 Adjust Process Scheduling 9.3 Manage Tuning Profiles

10 Operate Running Systems: Logs, Services & File Transfer

10.1 Locate and Interpret System Log Files and Journals 10.2 Preserve System Journals 10.3 Start, Stop, and Check Status of Network Services 10.4 Securely Transfer Files Between Systems

11 Configure Local Storage: Partitions and LVM

11.1 List, Create, and Delete Partitions on GPT Disks 11.2 Create and Remove Physical Volumes 11.3 Assign Physical Volumes to Volume Groups 11.4 Create and Delete Logical Volumes

12 Configure Local Storage: Mounting and Expansion

12.1 Mount File Systems at Boot by UUID or Label 12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively

13 Create and Configure File Systems: Local FS and Permissions

13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems 13.2 Extend Existing Logical Volumes 13.3 Diagnose and Correct File Permission Problems

14 Create and Configure File Systems: NFS and autofs

14.1 Mount and Unmount Network File Systems Using NFS 14.2 Configure autofs

15 Deploy and Maintain: Scheduling, Services & Targets

15.1 Schedule Tasks with at, cron, and systemd Timers 15.2 Start, Stop, and Enable Services at Boot 15.3 Configure Systems to Boot into a Specific Target

16 Deploy and Maintain: Time, Software Updates & Bootloader

16.1 Configure Time Service Clients 16.2 Install and Update Software from CDN, Remote Repos, and Local Files 16.3 Modify the System Bootloader

17 Manage Basic Networking

17.1 Configure IPv4 and IPv6 Addresses 17.2 Configure Hostname Resolution 17.3 Configure Network Services to Start Automatically at Boot 17.4 Restrict Network Access Using firewalld and firewall-cmd

18 Manage Users and Groups

18.1 Create, Delete, and Modify Local User Accounts 18.2 Change Passwords and Adjust Password Aging 18.3 Create, Delete, and Modify Local Groups and Memberships 18.4 Configure Privileged Access

19 Manage Security: Firewall, umask & SSH Keys

19.1 Configure Firewall Settings with firewall-cmd and firewalld 19.2 Manage Default File Permissions 19.3 Configure Key-Based Authentication for SSH

20 Manage Security: SELinux Modes and Contexts

20.1 Set Enforcing and Permissive Modes for SELinux 20.2 List and Identify SELinux File and Process Contexts 20.3 Restore Default File Contexts

21 Manage Security: SELinux Ports and Booleans

21.1 Manage SELinux Port Labels 21.2 Use Boolean Settings to Modify SELinux Settings

14.1 Mount and Unmount Network File Systems Using NFS

Key Takeaways Explain This Topic AI

Mount NFS shares with mount -t nfs (or mount.nfs) using server:/export /mountpoint; unmount with umount when the share is idle.

Persist NFS mounts in /etc/fstab with type nfs (or nfs4), options such as defaults,_netdev, and dump/pass fields 0 0 so mounts survive reboot after the network is up.

Discover exports with showmount -e server when the showmount client and mountd path are available; otherwise use the task’s given server:/path and verify with findmnt.

Create the local mountpoint first, fix firewall/SELinux only when needed, and prefer soft/timeo options carefully—exam graders care that the path works and persists.

EX200 credit is a working, reboot-surviving NFS mount at the required path, not a one-off manual mount that disappears after reboot.

Last updated: August 2026

14.1 Mount and Unmount Network File Systems Using NFS

Quick Answer: Mount with mount -t nfs server:/export /mnt/path , unmount with umount , and persist with an /etc/fstab line of type nfs (often with _netdev ). Prove success with findmnt / df -h . On EX200 you are usually the NFS client —the share already exists on a server named in the task.

Official skill and why it matters

Under Create and configure file systems , Red Hat expects you to mount and unmount network file systems using NFS . Typical lab wording:

  • “Mount the NFS share server1.example.com:/share at /mnt/nfsdata and ensure it mounts at boot.”
  • “Configure a persistent NFS mount of 172.25.250.10:/exports/docs on /docs .”
  • “Unmount the NFS file system from /mnt/temp when finished.”

A manual mount that works in your current shell is incomplete if the task requires boot persistence. Pair every durable NFS requirement with a correct fstab (or, in the next section, autofs when the task asks for on-demand mounts).

NFS client vs server (scope control)

Role What you configure EX200 focus for this objective

Server nfs-server , exports in /etc/exports , exportfs -r Often already done by the lab; you may only need client skills

Client Mount, umount, fstab, tools package Primary skill here

Do not rebuild an NFS server unless the task explicitly says to export. If you only need to use a share, stay on the client side.

Packages and basic connectivity

On RHEL 10 clients, NFS mount helpers usually ship with the base system or the NFS utilities package. If mount.nfs or showmount is missing: rpm -q nfs-utils

  • sudo dnf install -y nfs-utils
  • Confirm the server is reachable before blaming NFS: ping -c 2 server1.example.com
  • # or use the IP the task gives
  • getent hosts server1.example.com

Name resolution failures produce “cannot resolve” style mount errors—fix DNS/hosts first (networking chapter skills).

  • Discover exports: showmount (when available) showmount -e server1.example.com
  • showmount -e 172.25.250.10
  • showmount -a server1.example.com # all client mounts (server-side view; if permitted)

showmount -e lists exports advertised by the server (classic NFSv3-style mountd query). Output resembles: Export list for server1.example.com:

  • /exports/docs *
  • /share 172.25.0.0/16

Caveats for the exam:

Some environments restrict or firewall mountd/rpcbind so showmount times out even though NFSv4 mounting still works on port 2049.

If the task gives you server:/path , you do not need discovery—use the path as written.

Prefer the exact export string from the task or from a successful showmount line; trailing path mistakes ( /share vs /shares ) fail the mount.

When showmount fails but the task provides the export, proceed with mount -t nfs using that export.

  • Manual mount: mount -t nfs
  • Create the local directory first (empty mountpoint): sudo mkdir -p /mnt/nfsdata
  • sudo mkdir -p /docs
  • Mount forms: # Explicit type (recommended teaching form)
  • sudo mount -t nfs server1.example.com:/share /mnt/nfsdata
  • # IP and export path
  • sudo mount -t nfs 172.25.250.10:/exports/docs /docs
  • # Often equivalent helpers
  • sudo mount -t nfs4 server1.example.com:/share /mnt/nfsdata
  • sudo mount.nfs server1.example.com:/share /mnt/nfsdata

On modern RHEL, nfs frequently negotiates NFSv4 by default. Use nfs4 when a task or troubleshooting requires forcing v4 syntax; otherwise nfs is the standard fstab/mount type you will see in materials.

Useful mount options (client)

  • Option Meaning
  • rw / ro Read-write or read-only
  • defaults Standard local-style defaults bundle
  • _netdev Wait for network (important in fstab)
  • vers=4.2 / vers=3 Force NFS version when required
  • soft Return errors on timeout (can cause app errors)
  • hard Retry indefinitely (default hard behavior is common)
  • timeo= / retrans= Tune timeouts
  • bg Background mount retries (fstab-friendly for boot)
  • Example with options: sudo mount -t nfs -o rw,soft,timeo=30 server1.example.com:/share /mnt/nfsdata

Unless the task specifies options, start with simple defaults or no extra options, then add _netdev for persistence.

  • Verify the live mount findmnt /mnt/nfsdata
  • findmnt -t nfs,nfs4
  • mount | grep nfs
  • df -h /mnt/nfsdata
  • ls /mnt/nfsdata

# Write test only if the task implies a writable share and policy allows:

touch /mnt/nfsdata/exam-test && rm -f /mnt/nfsdata/exam-test

findmnt is the cleanest proof: source should look like server:/export and FSTYPE nfs or nfs4 .

  • Unmount NFS cd / # never stay inside the mountpoint
  • sudo umount /mnt/nfsdata
  • sudo umount -l /mnt/nfsdata # lazy unmount if busy (last resort)
  • Busy mount errors mean a shell, process, or open file is still using the path: lsof +f -- /mnt/nfsdata
  • fuser -vm /mnt/nfsdata

Close those processes or cd out of the directory, then umount again. Do not reboot solely to unmount unless you are out of time and the task requires a clean unmount state.

  • Persistent NFS: /etc/fstab
  • Six fields, same as local mounts: # <file system> <mount point> <type> <options> <dump> <pass>
  • server1.example.com:/share /mnt/nfsdata nfs defaults,_netdev 0 0
  • 172.25.250.10:/exports/docs /docs nfs defaults,_netdev 0 0
  • Field NFS guidance
  • 1 device server:/export (not UUID—NFS has no local FS UUID in the same sense)
  • 2 mountpoint Absolute path; directory must exist
  • 3 type nfs or nfs4
  • 4 options Include _netdev so boot waits for networking
  • 5 dump 0
  • 6 pass 0 (do not fsck remote NFS like local ext4)
  • Why _netdev matters

Without _netdev (or equivalent network-aware unit dependency), systemd may try to mount NFS before the network is ready, causing boot delays or failed mounts. RHEL/systemd also understands x-systemd.automount and other advanced options, but for classic EX200-style tasks, defaults,_netdev is the reliable teaching default.

Apply and test fstab sudo mkdir -p /mnt/nfsdata

# edit /etc/fstab, then:

sudo mount -a

# or mount only that line:

  • sudo mount /mnt/nfsdata
  • findmnt /mnt/nfsdata

echo $?

mount -a mounts all non- noauto fstab entries that are not yet mounted. A non-zero exit and an error about NFS usually means wrong server path, firewall, or network.

Optional: use noauto only when the task wants a fstab entry you mount manually later—rare for “mount at boot” wording. server1.example.com:/share /mnt/nfsdata nfs noauto,_netdev 0 0

  • End-to-end exam workflows
  • Workflow A — Persistent NFS mount at boot

Task: Mount utility.lab.example.com:/rhel/shared at /mnt/shared permanently. rpm -q nfs-utils || sudo dnf install -y nfs-utils

# Optional discovery:

  • showmount -e utility.lab.example.com
  • sudo mkdir -p /mnt/shared

# Add to /etc/fstab:

  • # utility.lab.example.com:/rhel/shared /mnt/shared nfs defaults,_netdev 0 0
  • sudo mount -a
  • findmnt /mnt/shared
  • ls /mnt/shared
  • Workflow B — Temporary mount only
  • Task: Mount the share for this session; no mention of boot. sudo mkdir -p /mnt/temp
  • sudo mount -t nfs 172.25.250.10:/exports/temp /mnt/temp
  • findmnt /mnt/temp

# When done:

sudo umount /mnt/temp

Do not leave a broken fstab line if persistence was not requested—but leaving a correct fstab is usually fine if it does not break boot.

  • Workflow C — showmount unavailable showmount -e server1
  • # clnt_create: RPC: Program not registered OR timeout
  • # Task said: server1.example.com:/public
  • sudo mkdir -p /public
  • sudo mount -t nfs server1.example.com:/public /public
  • findmnt /public

Trust the task’s export path when discovery fails.

Workflow D — Fix a hanging boot mount

If NFS is wrong in fstab, boots can stall. In recovery or after login: sudo vim /etc/fstab # fix server/export or add noauto/_netdev

  • sudo mount -a
  • systemctl --failed

Practice labs: always run mount -a before you rely on reboot.

Firewall and SELinux awareness (client-focused)

Server must allow NFS (firewalld services nfs , rpc-bind , mountd for older styles; NFSv4 often centers on 2049/tcp). If you only control the client and the share is “supposed to work,” focus on client config first.

Client egress is usually open in exam networks; if mount hangs, check routing and that you used the correct server interface/IP.

SELinux : mounting NFS is generally allowed for standard mountpoints; context issues appear more often when serving NFS or when labeling local content for export. If a service cannot read mounted files, check contexts later without abandoning a correct mount.

NFS vs local mounts (quick comparison)

  • Topic Local disk NFS
  • Identifier in fstab UUID= / LABEL= server:/export
  • Type field xfs , ext4 nfs / nfs4
  • pass field 0–2 0
  • Network dependency No Yes ( _netdev )
  • Offline behavior Disk present Mount fails or hangs if server down
  • Common traps

Forgetting to create the mountpoint — mkdir -p first.

Wrong export path — /share vs /exports/share ; use task or showmount -e .

fstab without _netdev — flaky boot ordering.

pass field 1 or 2 on NFS — keep 0 0 .

Staying in the directory during umount — cd / then umount .

Assuming showmount must work — NFSv4-only or firewalled mountd still may allow mount -t nfs .

Using UUID= for NFS — not the client fstab pattern for remote shares.

Mount works, fstab missing — fails after reboot; graders check persistence.

Typo in hostname — verify with ping / getent hosts .

Confusing this with autofs — static fstab mounts stay mounted; autofs mounts on access (next section).

Relationship to other objectives

  • Skill Where
  • Local UUID/label fstab Storage mount chapter
  • NFS mount/umount + fstab This section
  • On-demand automount Section 14.2 autofs
  • Hostname resolution / firewall Networking and security chapters
  • Section checkpoint

You should install or confirm nfs-utils when needed, discover exports with showmount -e when available, mount with mount -t nfs server:/export /path , unmount safely with umount , write six-field fstab lines using type nfs and options including _netdev with dump/pass 0 0 , validate with mount -a and findmnt , and treat reboot survival as the success criterion whenever the task requires a permanent NFS mount. That is the EX200 standard for mounting and unmounting network file systems using NFS.