NFS Kernel and Package Options

Every major Linux distribution ships with an NFS server called rpc.nfsd. In most distributions, this server is part of the nfs-utils package, but Debian places it in the nfs-kernel-server package. These standard servers rely on NFS server support that's built into the kernel, as described shortly. Older NFS servers did not rely on this support, and such servers are still available on some distributions. For instance, Debian's nfs-user-server runs entirely in user space without taking advantage of the kernel NFS server support.

Many distributions present options to activate the NFS server at system installation or when you install the NFS server package. For others, you may need to create or activate a SysV or local startup script, as described in Chapter 22. The startup script is called nfs-kernel-server (or nfs-user-server for the user-mode server) in Debian, nfs in Mandrake and Red Hat, and nfsserver in SuSE.

In order to use a kernel-based server, your kernel must include the appropriate options to support NFS features. Other kernel features are required to mount another computer's NFS exports. Both sets of options are accessible from the File Systems O

Network File Systems kernel configuration menu, as shown in Figure 24.1 for a 2.5.67 kernel. (Chapter 15, "Creating a Custom Kernel," describes Linux kernel configuration in more detail.) The NFS File System Support option enables support for NFS client functionality, and the NFS Server Support option activates NFS server functionality.

Figure 24.1 : The Linux kernel provides NFS support options in its configuration tool. Note The 2.4.x kernel series uses a GUI configuration tool that looks different than the 2.5.67 tool shown in Figure 24.1. Most of the options are the same, though, with the exception of the NFSv4 options, which aren't present in 2.4.x kernels.

Figure 24.1 : The Linux kernel provides NFS support options in its configuration tool. Note The 2.4.x kernel series uses a GUI configuration tool that looks different than the 2.5.67 tool shown in Figure 24.1. Most of the options are the same, though, with the exception of the NFSv4 options, which aren't present in 2.4.x kernels.

NFS has undergone several revisions over the years. These NFS version numbers are often appended to the NFS acronym, as in NFSv2 for NFS version 2. This level is the default in the Linux kernel options; to use NFSv3 or NFSv4, you must activate extra features, which are visible in Figure 24.1's menu. As of the late 2.4.x and 2.5.x kernels, NFS support through NFSv3 is reasonably stable and complete. NFSv4 support is still considered experimental as of the 2.5.66 kernel (the latest as I write). I recommend avoiding the use of an experimental NFS driver; it may result in poor performance, lost files, or other problems.

All Linux distributions' default kernels support NFS, although it's sometimes compiled as separate modulesā€”nfs.o for the NFS client and nfsd.o for the NFS server. The appropriate module should load automatically when you try to mount a remote export or start the NFS server. If it doesn't, consult the "Subtle and Flexible: Loading Drivers as Modules" section of Chapter 1, "Optimizing System Architecture Usage." Although the NFS support modules aren't hardware drivers, loading them is done using the same tools you use to load hardware driver modules. Some distributions ship with this support compiled into the main kernel file rather than as a module.

Computer Hard Drive Data Recovery

Computer Hard Drive Data Recovery

Learn How To Recover Your Hard Drive Data After A Computer Failure.

Get My Free Ebook


Post a comment