Introduction to NFS Utilities

The NFS Utilities package contains the userspace server and client tools necessary to use the kernel's NFS abilities. NFS is a protocol that allows sharing file systems over the network.

This package is known to build and work properly using an LFS 7.9-systemd platform.

This package is known to build properly using the gcc-6 compiler.

Package Information

NFS Utilities Dependencies




libevent-2.0.22, SQLite-3.13.0 and libnfsidmap-0.26 (for NFSv4 support), MIT Kerberos V5-1.14.2 or libgssapi, and librpcsecgss (for GSS and RPC security support) and libcap-2.25 with PAM

Required (runtime)


User Notes:

Kernel Configuration

Enable the following options in the kernel configuration (choose client and/or server support as appropriate) and recompile the kernel if necessary:

File systems  --->
  [*] Network File Systems  --->         [CONFIG_NETWORK_FILESYSTEMS]
    <*/M> NFS client support             [CONFIG_NFS_FS]
    <*/M> NFS server support             [CONFIG_NFSD]

Select the appropriate sub-options that appear when the above options are selected.



In BLFS we assume that nfs v3 will be used. If the server offers nfs v4 (for linux, CONFIG_NFSD_V4) then auto-negotiation for v3 will fail and you will need to add nfsver=3 to the mount options. This also applies if that option is enabled in the client's kernel, for example in a distro trying to mount from a BLFS v3 server.

Installation of NFS Utilities

Install NFS Utilities by running the following commands:

./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --without-tcp-wrappers \
            --disable-nfsv4        \
            --disable-gss &&

If your /usr directory is NFS mounted, you should install the executables in /sbin by passing an additional parameter --sbindir=/sbin to the above ./configure command.

Now, as the root user:

make install &&
chmod u+w,go+r /sbin/mount.nfs

The tests for this package require that the package be installed and configured as specified below. In addition, the the daemon from rpcbind-0.2.3 needs to be running and the tests need to be run as the root user.

To test the results, issue, as root: make check.

Command Explanations

--without-tcp-wrappers: This option is needed because TCP Wrappers is not in BLFS.

--disable-nfsv4: This allows the package to be built when libnfsidmap has not been installed.

--disable-gss: Disables support for RPCSEC GSS (RPC Security).

Configuring NFS Utilities

Server Configuration

/etc/exports contains the exported directories on NFS servers. Refer to the exports.5 manual page for the syntax of this file. Also refer to the "NFS HowTo" available at for information on how to configure the servers and clients in a secure manner. For example, for sharing the /home directory over the local network, the following line may be added:



Be sure to replace the directory, network address. and prefix above to match your network. The only space in the line above should be between the directory and the network address.

Systemd Units

To start the NFS server daemons at boot, install the systemd units from the blfs-systemd-units-20160602 package by running the following command as the root user:

make install-nfsv4-server

If you have disabled NFSv4 support, run the following command as the root user to omit the NFSv4 specific systemd units:

make install-nfs-server

You can edit the /etc/default/nfs-utils file to change the startup options for NFS daemons. Defaults should be fine for most use cases.

Client Configuration

/etc/fstab contains the directories that are to be mounted on the client. Alternately the partitions can be mounted by using the mount command with the proper options. To mount the /home and /usr partitions, add the following to the /etc/fstab:

<server-name>:/home  /home nfs   rw,_netdev 0 0
<server-name>:/usr   /usr  nfs   ro,_netdev 0 0

The options which can be used are specified in man 5 nfs. If both the client and server are running recent versions of linux, most of the options will be negotiated. You can specify either rw or ro, _netdev if the filesystem is to be automatically mounted at boot, or noauto (and perhaps user) for other filesystems.

If the fileserver is not running a recent version of linux, you may need to specifiy other options.

If you are using systemd, you may need to enable autofs v4 in your kernel, and add the option comment=systemd.automount. Some machines need this, because systemd tries to mount the external fs's before the network is up, others do not need it. An alternative is for root to run mount -a.

Systemd Units


The following systemd unis are not required if the nfs-server units were previously installed.

To start the NFS client services at boot, install the systemd units from the blfs-systemd-units-20160602 package by running the following command as the root user:

make install-nfs-client


Installed Programs: exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs), nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug, showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs), and umount.nfs4 (link to mount.nfs)
Installed Libraries: None
Installed Directories: /var/lib/nfs

Short Descriptions


maintains a list of NFS exported file systems.


displays NFS client per-mount statistics.


Used to mount a network share using NFS


Used to mount a network share using NFSv4


Report input/output statistics for network filesystems.


displays statistics kept about NFS client and server activity.


is a script that is a part of the autologin feature mandated by the pnfs-objects standard.


implements the NFS mount protocol on an NFS server.


implements the user level part of the NFS service on the server.


is used by the NFS file locking service. Run on both sides, client as well as server, when you want file locking enabled.


sets or clears the kernel's NFS client and server debug flags.


displays mount information for an NFS server.


is used to send Network Status Monitor reboot messages.


is a script called by nfsmount when mounting a filesystem with locking enabled, if statd does not appear to be running. It can be customised with whatever flags are appropriate for the site.


Used to unmount a network share using NFS


Used to unmount a network share using NFSv4

Last updated on 2016-06-09 15:58:33 -0500