Lesson 1
NFS Client Networking
In a networked environment, users need access to the same information on every host. Keeping an up-to-date copy of every file you need on each computer would be an impossible task. The Network File System (NFS) allows users to inspect and modify remotely stored files. Every host on the network can use a single server's file space for home directories. No matter which host you work from, you appear to log in to the same "machine."
Question: What role does the Network File System play when used within the context of Linux Networking?
Answer: The Network File System (NFS) is a protocol used in Linux networking that allows remote access to files over a network. NFS allows a computer to mount a file system from a remote computer as if it were a local file system. This enables users to access files on remote computers as if they were stored on their own computer.
In a Linux networking context, NFS is used for sharing files and resources between computers. For example, a file server might make certain files or directories available to other computers on the network using NFS. Other computers on the network can then mount the shared file system and access the files as if they were stored locally.
NFS plays an important role in Linux networking because it provides a simple and efficient way to share files and resources between computers. It is often used in environments where multiple computers need access to the same data, such as in academic or research settings, or in corporate environments where employees need to access shared files or databases.
Learning objectives
After completing this module, you will be able to:
- Describe the NFS
- Define and explain Remote Procedure Call (RPC)
- Use the
mount
command to access NFS shares
- Use
/etc/fstab
to automate the NFS client-side mounts
The next lesson describes the Network File System (NFS).
FreeBSD supports the Network File System (NFS)
which allows a server to share directories and files with clients over a network. With NFS, users and programs can access files on remote systems as if they were stored locally. NFS has many practical uses. Some of the more common uses include:
- Data that would otherwise be duplicated on each client can be kept in a single location and accessed by clients on the network.
- Several clients may need access to the /usr/ports/distfiles directory. Sharing that directory allows for quick access to the source files without having to download them to each client.
- On large networks, it is often more convenient to configure a central NFS server on which all user home directories are stored. Users can log into a client anywhere on the network and have access to their home directories.
- Administration of NFS exports is simplified. For example, there is only one file system where security or backup policies must be set.
- Removable media storage devices can be used by other machines on the network. This reduces the number of devices throughout the network and provides a centralized location to manage their security.
It is often more convenient to install software on multiple machines from a centralized installation media.
NFS consists of a server and one or more clients. The client remotely accesses the data that is stored on the server machine. In order for this to function properly, a few processes have to be configured and running.
These daemons must be running on the server:
- Daemon: The NFS daemon which services requests from NFS clients.
- mountd The NFS mount daemon which carries out requests received from nfsd.
- rpcbind This daemon allows NFS clients to discover which port the NFS server is using.