With YaST, turn a host in your network into an NFS server—a server that exports directories and files to all hosts granted access to it. This could be done to provide applications to all members of a group without installing them locally on each and every host. To install such a server, start YaST and select +. A dialog like that in Figure 28.2, “NFS Server Configuration Tool” opens.
Next, activate . If you intend to use NFSv4, activate and enter the . The NFSv4 domain name must be identical with the one used on all clients that should connect to the server.
Click if you need secure access to the server. A prerequisite for this is to have Kerberos installed in your domain and both the server and the clients are kerberized. Click .
In the upper text field, enter the directories to export. Below, enter the hosts that should have access to the respective directory. This dialog is shown in Figure 28.3, “Configuring an NFS Server with YaST”. The figure shows the scenario where NFSv4 is enabled in the previous dialog.
For a fixed set of clients, there are two types of directories that can be exported—directories that act as pseudo root file systems and those that are bound to some subdirectory of the pseudo file system. This pseudo file system acts as a base point under which all file systems exported for the same client set take their place. For a client or set of clients, only one directory on the server can be configured as pseudo root for export. For this same client, export multiple directories by binding them to some existing subdirectory in the pseudo root.
After adding a directory in the upper half, another dialog for entering the client and option information pops up automatically. Later on, to add a new client (client set), click .
In the small dialog that opens, enter the host wild card. There are four
possible types of host wild cards that can be set for each host: a
single host (name or IP address), netgroups, wild cards (such as
* indicating all machines can access the server), and
IP networks. Then, in , include
fsid=0 in the comma-separated list of options to
configure the directory as pseudo root. If this directory should be
bound to another directory under an already configured pseudo root, make
sure that a target bind path is given in the option list with
bind=/target/path.
For example, suppose that the directory /exports is
chosen as the pseudo root directory for all the clients that can access
the server. Then add this in the upper half and make sure that the
options entered for this directory include fsid=0. If
there is another directory, /data, that also needs
to be NFSv4 exported, add this directory to the upper half. While
entering options for this, make sure that
bind=/exports/data is in the list and that
/exports/data is an already existing subdirectory
of /exports. Any change in the option
bind=/target/path, whether addition, deletion,
or change in value, is reflected in . This column is not directly editable, instead
it contains summarizing directories and their nature. After the information is
complete, click to complete the configuration
or to restart the service.
For more information about options available regarding the directory
export, refer to the manual page of Export.
Click to complete the configuration.
![]() | Automatic Firewall Configuration |
|---|---|
If a firewall is active on your system (SuSEfirewall2), YaST adapts
its configuration for the NFS server by enabling the
| |
Make sure that is not checked in the initial dialog before clicking .
The next dialog has two parts. In the upper text field, enter the
directories to export. Below, enter the hosts that should have access to
them. There are four types of host wild cards that can be set for each
host: a single host (name or IP address), netgroups, wild cards (such as
* indicating all machines can access the server), and
IP networks.
This dialog is shown in Figure 28.4, “Exporting Directories with NFSv2 and v3”. Find a more thorough explanation of these options in man exports. Click to complete the configuration.
Both NFSv3 and NFSv4 exports can coexist on a server. After enabling the
support for NFSv4 in the initial configuration dialog, those exports for
which fsid=0 and
bind=/target/path are not included in the
option list are considered v3 exports. Consider the example in
Figure 28.3, “Configuring an NFS Server with YaST”. If you add another
directory, such as /data2, using then in the corresponding options list do not
mention either fsid=0 or
bind=/target/path, this export acts as a v3
export.
![]() | Important |
|---|---|
Automatic Firewall Configuration If SuSEfirewall2 is active on your system, YaST adapts its configuration for the NFS server by enabling service when is selected. | |