27.4 Exporting File Systems with YaST
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 NFS Server Configuration Tool opens.
. A dialog
like the one in
Figure 27-2 NFS Server Configuration Tool
and enter the
if you need secure access to
the server. A prerequisite for this is to have Kerberos installed on 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
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 the
exports man page. Click to
complete the configuration.
Figure 27-3 Configuring an NFS Server with YaST
IMPORTANT: Automatic Firewall Configuration
If a firewall is active on your system (SuSEfirewall2), YaST adapts
its configuration for the NFS server by enabling the
nfs service when is selected.
27.4.1 Exporting for NFSv4 Clients
Activate 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 the
name is the same as the one 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 27.7, For More Information.
. 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 client, export multiple directories by
binding them to some existing subdirectory in the pseudo root.
Figure 27-4 Exporting Directories with NFSv4
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
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.
27.4.2 NFSv3 and NFSv2 Exports
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
This dialog is shown in
Figure 27-5. Find a more
thorough explanation of these options in man exports.
Click to complete the configuration.
Figure 27-5 Exporting Directories with NFSv2 and v3
27.4.3 Coexisting v3 and v4 Exports
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 27-3. 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
Automatic Firewall Configuration
If SuSEfirewall2 is active on your system, YaST adapts its
configuration for the NFS server by enabling the nfs
service when is selected.