NFS
The Network File System (NFS), is an internet standard protocol used by Linux, UNIX, and similar operating systems as their native network file system.
NFS servers export shares) and NFS clients mount an exported share to a local mount point.
Mount NFS Shares
Temporarily mount an NFS share using the mount
command:
Persistently mount an NFS share using /etc/fstab
:
Use the nfsconf
tool to manage NFS client and server configuration files to get, set, or unset NFS configuration parameters. It updates the /etc/nfs.conf
configuration file.
Examples:
To configure an NFSv4-only client:
Automounter
The automounter is a service autofs
that automatically mounts NFS shares "on-demand," and automatically unmounts NFS shares when they are no longer used.
Install the autofs package:
Add a master map file to /etc/auto.master.d
:
Start the autofs
service:
Example of direct mapping:
Summary
Mount and unmount an NFS export from the command line.
Configure an NFS export to mount at startup automatically.
Configure the automounter with direct and indirect maps, and describe their differences. Configure NFS clients to use NFSv4 using the new nfsconf
tool.
Command References:
mount
, umount
, fstab
, nfsconf
, autofs
.