Loading...
Lab activity
AutoFS and NFS Client Mounts
Learn how to configure NFS exports and automate network filesystem mounts using AutoFS, including indirect and direct maps, firewall, and SELinux settings.
Overview
In this lab, we will learn how to configure an NFS export and mount it automatically using AutoFS. We will configure the NFS server, prepare the exported directory, configure firewall and SELinux settings, and verify the NFS share with a manual mount. You will then configure both indirect and direct AutoFS maps so the NFS share is mounted on demand when the mount point is accessed. By the end of this lab, you will understand how NFS and AutoFS work together to provide efficient, on-demand network filesystem mounts.
Learning Outcomes
- Understand how to configure and export an NFS share.
- Configure firewall services required for NFS communication.
- Configure the SELinux boolean required for read-write NFS exports.
- Verify an NFS export using a manual mount before configuring AutoFS.
- Configure an indirect AutoFS map for on-demand NFS mounting.
- Configure a direct AutoFS map using the
/-master map entry. - Verify and troubleshoot AutoFS mounts using system commands and logs.
Key Concepts
- NFS: A network filesystem that allows systems to access shared directories over a network.
- NFS Export: A directory made available to clients through the NFS server configuration in
/etc/exports. - AutoFS: An automounting service that mounts network filesystems on demand when they are accessed and unmounts them after a period of inactivity.
- Indirect Map: An AutoFS configuration where shares are mounted below a common parent directory using keys defined in the map file.
- Direct Map: An AutoFS configuration where the complete mount path is specified directly in the map file and registered using
/-. - SELinux Boolean: A configurable SELinux setting that controls whether specific system operations are permitted, such as read-write NFS exports.
- AutoFS Timeout: The period of inactivity after which an automatically mounted filesystem can be unmounted.
Why Needed?
- On-Demand Mounting: Automatically mounts NFS shares only when they are accessed.
- Efficient Resource Usage: Automatically unmounts inactive network filesystems instead of keeping them mounted permanently.
- Centralized File Sharing: Allows systems to access shared data through NFS without maintaining local copies.
- Improved Reliability: Verifying the NFS server, firewall, SELinux, and mount configuration separately helps identify configuration problems.
- Flexible Mount Configuration: Supports both indirect and direct AutoFS maps for different filesystem mounting requirements.
-
RHCSA Preparation Course
-
FREE Labs
-
Red Hat Administration (RH124)Access Linux File SystemManage Files using CLICreate, View, and Edit Text FilesManage Local Users and GroupsControl Access to FilesMonitor and Manage ProcessesControl Services and DaemonsConfigure and Secure SSHAnalyze and Store LogsArchive and Transfer FilesInstall and Update SoftwareManage NetworkingAnalyze Servers
-
Red Hat Administration (RH134)Improve Command Line ProductivitySchedule Future TasksTune System PerformanceControlling Access to Files with ACLManaging SELinux SecurityManage Basic StorageManage Logical VolumeImplement Advanced Storage FeaturesAccess Network Attached StorageManage Network Security (Firewall)Run ContainersFlatpak Application ManagementSystemd TimersSELinux ManagementMount FileSystems Using UUIDAnalyze and Preserve System LogsManage Containers with QuadletsAutoFS and NFS Client MountsTime Synchronization with ChronyManage System Boot Targets
-
Pre-Exam Practice
-
Labs Beyond SyllabusBasic Command Line ToolsMounting Filesystem and Creating LinksCommand Line Text ProcessingIntroduction to Shell ScriptsIntermediate Shell ScriptingAdvanced Shell ScriptingSELinux BasicsSELinux Policy ManagementSELinux TroubleshootingPodman BasicsBuilding and Running ContainersPodman NetworkingLVM ManagementMultiple Logical VolumesLVM Disaster Recovery
-
Certificate Of Completion
-
RHCSA Mock Exam