NFS Servers Available for Linux


There have been several important changes in Linux's NFS support between 1998 and 2002. This section summarizes two of these changes, in case you have older documentation or are using an older distribution. You can often use whatever NFS server ships with your distribution, but sometimes you may have to upgrade (or occasionally downgrade) your server to achieve compatibility with other systems. You can find information on the latest NFS developments for Linux at http://nfs. sourceforge .net.

User -Mode and Kernel-Mode Servers

An NFS server basically directs data between a disk file and a network interface. The original Linux NFS servers operated in user mode, which means that they had no privileged access to or help from the kernel. This design, however, means that data must pass from the disk through the kernel to a user-mode program and back through the kernel and to the network (or in the opposite direction). The transfer of data from the kernel to the user-mode program and back again impedes performance, so the kernel and the NFS server were redesigned so that the kernel could handle more of the necessary transfers itself. This resulted in a speed increase. To take advantage of this improvement, you must activate the NFS Server Support option in the Network File Systems menu of the kernel's File Systems menu (see Figure 8.1); without this support, your kernel won't do its part of the NFS server job. You must also use an NFS server that's designed to use the kernel's NFS server support. This server is often called knfsd , as opposed to the regular nfsd , but this distinction is often not made explicit.

Figure 8.1. The Linux kernel includes support for both client and server NFS functions.

graphics/08fig01.gif

NOTE

graphics/note.gif

The Linux kernel configuration tools also provide an option called NFS File System Support. This option provides the kernel's NFS client tools, which work in conjunction with the normal mount command to mount a remote NFS server's exports on your local directory tree. The kernel's NFS client and server support options are independent of each other; you can include neither , just one, or both, as you see fit.


NFS Versions 2 and 3

Like many other protocols and programs, NFS has undergone periodic revisions. In 2002, version 3 of NFS, or NFSv3 for short, is the latest version in common use. (In fact, NFSv4 also exists, but Linux support for NFSv4 is embryonic at best. Check http://www.nfsv4.org for more information.) Many NFS clients and servers, however, don't yet support NFSv3; they support NFSv2. Most of the Linux 2.2. x kernels , for instance, support NFSv2 but not NFSv3. Only with kernel 2.2.18 and later does NFSv3 support appear as a standard kernel option. (You can obtain NFSv3 patches for some earlier versions of the kernel.) NFSv3 introduces several improvements, including better file locking, improved performance via an asynchronous mode (Linux's NFSv2 implements an asynchronous mode, but in a non-standard way), extensions taken from BSD's Not Quite NFS (NQNFS), and optional use of TCP connections (NFSv2 uses UDP exclusively ”but TCP connections are not fully implemented in Linux's NFSv3, as of early 2002). As a general rule, NFSv2 is adequate for many small networks with casual users, but NFSv3 is very desirable for higher server loads ”at least, when fully implemented. Early experimental versions of Linux's NFSv3 performed poorly because they didn't implement the faster asynchronous mode operation, but the 2.4. x kernel's NFSv3 support implements this feature for server operations. (Client operations are still slow as of kernel 2.4.17.)

If you want to use an NFSv3 server that uses the kernel's NFS acceleration, you must select the Provide NFSv3 Server Support option in the kernel configuration tools (this is a suboption of the NFS Server Support option described earlier and shown in Figure 8.1). Similarly, the Provide NFSv3 Client Support option is required to use NFSv3 features as a client. The NFS protocols allow for fall-back operation, so if one system provides NFSv3 support but the other system only supports NFSv2, the two computers will still be able to communicate using NFSv2 protocols. Thus, chances are you'll want to select NFSv3 support.

In addition to kernel options, you need versions of NFS support utilities that support NFSv3 if you want to use it. Specifically, you need nfs- utils version 0.1.6 or later for NFSv3 server support and mount version 2.10m or later for NFSv3 client support. Most distributions include these tools in packages of these names , so you can check your installation CD-ROM or use rpm or dpkg to check for the appropriate tools. For instance, you might type the following to check for the appropriate version of mount on an RPM-based system:

 $  rpm -q mount  mount-2.11b-5mdk 

In this example, the output reveals that mount version 2.11b is installed, which is more than adequate for NFSv3 client support.



Advanced Linux Networking
Advanced Linux Networking
ISBN: 0201774232
EAN: 2147483647
Year: 2002
Pages: 203

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net