Operation Manual
18.3.2 Exporting File Systems Manually
The conguration les for the NFS export service are /etc/exports and /etc/
sysconfig/nfs. In addition to these les, /etc/idmapd.conf is needed for
the NFSv4 server conguration. To start or restart the services, run the command
rcnfsserver restart. This also starts the rpc.idmapd if NFSv4 is congured
in /etc/sysconfig/nfs. The NFS server depends on a running RPC portmapper.
Therefore, also start or restart the portmapper service with rcrpcbind restart.
18.3.2.1 Exporting File Systems with NFSv4
NFSv4 is the latest version of NFS protocol available on openSUSE. Conguring direc-
tories for export with NFSv4 differs slightly from previous NFS versions.
/etc/exports
The /etc/exports le contains a list of entries. Each entry indicates a directory
that is shared and how it is shared. A typical entry in /etc/exports consists of:
/shared/directory host(option_list)
For example:
/export 192.168.1.2(rw,fsid=0,sync,crossmnt)
/export/data 192.168.1.2(rw,bind=/data,sync)
Here the IP address 192.168.1.2 is used to identify the allowed client. You can also
use the name of the host, a wild card indicating a set of hosts (*.abc.com, *, etc.),
or netgroups (@my-hosts).
The directory which species fsid=0 is special. It is the root of the lesystem that is
exported, sometimes referred to as the pseudo root lesystem. This directory must also
have the crossmnt for correct operation with NFSv4. All other directories exported
via NFSv4 must be mounted below this point. If you want to export a directory that is
not within the exported root, it needs to be bound into the exported tree. This can be
done using the bind= syntax.
In the example above, /data is not within /export, so we export /export/data,
and specify that the /data directory should be bound to that name. The directory
/export/data must exist and should normally be empty.
Sharing File Systems with NFS 339










