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 Figure 21.2, “NFS Server Configuration Tool” opens.
+ . A dialog like that inNext, activate
and enter the .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 them. This dialog is shown in
Figure 21.3, “Configuring an NFS Server with YaST”. The
figure shows the scenario where NFSv4 is enabled in the previous dialog.
Bindmount Targets
is shown in the right pane. For more
details, refer to the help shown on the left pane. In the lower half of
the dialog, there are four options that can be set for each host:
single host
, netgroups
,
wildcards
, and IP networks
. For a more
thorough explanation of these options, refer to exports
man page. 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
|
Activate Section 21.4.3, “Coexisting v3 and v4 Exports”.
to support NFSv4 clients. Clients with NFSv3 can still access the server's exported directories if they are exported appropriately. This is explained in detail in
After activating NFSv4, enter an appropriate domain name. Make sure that
the name entered is the same as the one present in the
/etc/idmapd.conf
file of any NFSv4 client that accesses this
particular server. This parameter is for the idmapd service that is
required for NFSv4 support (on both server and client). Leave it as
localdomain
(the default) if you do not have special
requirements. For more information, see
Section 21.7, “For More Information”.
Click
. The dialog that follows has two sections. The upper half consists of two columns named and . is a directly editable column that lists the directories to export.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.
In the lower half of the dialog, enter the client (wild card) and export options for a particular directory. After adding a directory in the upper half, another dialog for entering the client and option information pops up automatically. After that, 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 column, instead
summarizing directories and their nature. After the information is
complete, click to complete the configuration
or to restart the service.
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 21.5, “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 21.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. |