-
Notifications
You must be signed in to change notification settings - Fork 3
2 Overview
In the NFS protocol, there are servers that provide file access to clients over the network.
An export is a directory on the server that can be accessed by clients.
NFS is just a protocol specification, each operating system has its own implementation of the protocol, which means that the feature set and configuration options differ between operating systems.
Both the server and the client are usually integrated into the operating system kernel with support from userspace programs.
There are also some implementations of the NFS protocol that run only in userspace which is useful for development and testing.
On most server implementations, there is a configuration file called /etc/exports
that contains every directory that is supposed to be exported as well as some options for these exports. The exact configuration format differs between operating systems.
On Linux, the /etc/exports
has the following format:
/PATH/TO/EXPORT CLIENT1(OPTIONS1) CLIENT2(OPTIONS2) ...
Each line contains the path to the exported directory, clients that are allowed to access the export and options for that client separated by commas without spaces in between. It is also possible to have multiple lines for the same export. For example, a configuration entry could look like this:
/media/disk/share 192.168.2.123(rw,sec=krb5p:krb5i,subtree_check,all_squash,insecure,xprtsec=none)
Once the exports are configured, clients can mount them and use them like local file systems. In the background, file operations are sent to the server over the network.