Projects: NFS Version 4 Open Source Reference Implementation projects techreports press lab location staff
citi top.2 top.3
citi mid.3
bot.1 bot.2 bot.3

Projects: NFS Version 4 Open Source Reference Implementation

Linux 2.5.31 Distribution

This work was done as part of the NFS Version 4 Open Source Reference Implementation project. This release includes the initial patches for an NFSv4 client and server to be applied against the Linux 2.5.31 kernel.

For now, only the bare minimum of features have been implemented -- just enough to create a functional network file system. Byte-range file locking, state management, recovery from server reboot, extended attributes, ACL's, the NFSv4 "pseudo filesystem", and strong security are still unimplemented in 2.5.x. Actually, we have implementations of most of these features in 2.4.x, but are waiting to port them to 2.5.x until the "minimal" patches have been approved.

(For those familiar with the NFSv4 protocol, I should elaborate by saying that the client does all of its READs and WRITEs using "magic stateids" and uses OPEN and CLOSE only when it needs to create a file. The server treats all state-manipulating operations such as SETCLIENTID,OPEN,CLOSE... as no-ops and does not remember state. Instead of a proper implementation of the pseudo filesystem, the first entry in /etc/exports is chosen as the nominal root.)

Download and Install

  • Apply the NFSv4 patches to a clean 2.5.31 kernel. It is easiest to apply the "grand unified patch" patch-2.5.31-E. Alternatively, the patches are posted individually below, with a paragraph describing each. During the kernel config, be sure to select "y" for "NFSv4 client support" and "NFSv4 server support".

  • Download and install the GSSD daemon. This daemon must be running on both the client and server.

  • Warning: Special configuration on the server is necessary before an NFSv4 export will be accessible. First, it must be exported specifically to the client in question, without use of string wildcards, e.g.
    in /etc/exports is OK, but
       /some/export     *
    is not.

    Second, only the first export (by order in /etc/exports) will be visible to a given client.

    Finally, this export will appear to an NFSv4 client as '/' instead of the actual export pathname (/some/export in the example above).

    All of this special configuration is only necessary because this set of patches does not include a proper implementation of the NFSv4 pseudo filesystem. As soon as these patches patches (or a variant thereof) is incorporated into the kernel, our next goal is to develop a satisfactory pseudofs for 2.5.x, at which point the need for this special configuration will go away.

  • On the client, you will need a patched version of the mount and umount utilities. Download util-linux-2.11t from, apply the patch patch-util-linux-2.11t-A, and build mount and umount as usual. If you are nervous about tampering with the built-in mount and umount on your system, we recommend creating symlinks, e.g.
       # ln -s /usr/src/util-linux-2.11t-nfsv4/mount/mount /usr/local/bin/mount4
       # ln -s /usr/src/util-linux-2.11t-nfsv4/mount/umount /usr/local/bin/umount4
    You should then be able to start the server as usual, and mount with
       # mount4 -t nfs -o vers=4,... /mnt/nfs
    If this doesn't work, it is probably because GSSD is not running on either the client or the server, or because you're not mounting '/' (see the warning above about special server configuration).

    Warning: This version of the mount utility is not the same as the one distributed with our 2.4.18 release. In fact, the two are mutually incompatible!


14 Aug 2002 Remove noisy printk from nfsd_svc(). (Christoph Hellwig)
14 Aug 2002 Reorder 2.5.31 patchset: put changes to fs/ last. (Christoph Hellwig)


Incremental patches against 2.5.31

  patch 01/38: new error codes
  patch 02/38: NFSv4 protocol header
  patch 03/38: SUNRPC: support for GSSD client
  patch 04/38: CLIENT: change CONFIG_NFS_V3 to CONFIG_NFS_V3 || CONFIG_NFS_V4
  patch 05/38: CLIENT: change inode to dentry in ->readdir() nfs_rpc_op
  patch 06/38: CLIENT: change inode to dentry in ->setattr() nfs_rpc_op
  patch 07/38: CLIENT: change hard limit on symlink length
  patch 08/38: CLIENT: change fsid in 'struct nfs_fattr' 
  patch 09/38: CLIENT: new fields in 'struct nfs_mount_data'
  patch 10/38: CLIENT: changes to mount path in fs/nfs/inode.c
  patch 11/38: CLIENT: add change_attr to nfs_fattr
  patch 12/38: CLIENT: space_used in nfs_fattr
  patch 13/38: CLIENT: add ->setup_read() nfs_rpc_op for async read, part 1
  patch 14/38: CLIENT: add ->setup_read() nfs_rpc_op for async read, part 2
  patch 15/38: CLIENT: add ->setup_{write,commit}() for async write, part 1
  patch 16/38: CLIENT: add ->setup_{write,commit}() for async write, part 2
  patch 17/38: CLIENT: move nfs_async_handle_jukebox() into ->unlink_done()
  patch 18/38: CLIENT: put nfs_async_handle_jukebox() in fs/nfs/nfs3proc.c
  patch 19/38: CLIENT: lease time in 'struct nfs_fsinfo'
  patch 20/38: CLIENT: giant patch importing NFSv4 client functionality
  patch 21/38: SERVER: error codes in include/linux/nfsd/nfsd.h
  patch 22/38: SERVER: type checking in fh_verify()
  patch 23/38: SERVER: change ->rq_vers==3 to ->rq_vers>2
  patch 24/38: SERVER: return err_nofilehandle if missing fh in fh_verify()
  patch 25/38: SERVER: wipe out all evidence in fh_put()
  patch 26/38: SERVER: new routine fh_dup2()
  patch 27/38: SERVER: expand filehandle to 128 bytes
  patch 28/38: SERVER: allow resfh==fhp in fh_compose()
  patch 29/38: SERVER: overflow check in nfsd_commit()
  patch 30/38: SERVER: allow type==0 in nfsd_unlink()
  patch 31/38: SERVER: tweak nfsd_create_v3() for NFSv4
  patch 32/38: SERVER: new argument to nfsd_access()
  patch 33/38: SERVER: tweak nfsd_readdir() for NFSv4
  patch 34/38: SERVER: new routine exp_pseudoroot() [trivial for now]
  patch 35/38: SERVER: header file for NFSv4 XDR
  patch 36/38: SERVER: ensure XDR buffer is large enough for NFSv4
  patch 37/38: SERVER: giant patch importing NFSv4 server functionality
  patch 38/38: switches in fs/, fs/

"Grand Unified Patch" against 2.5.31


Mount/umount patch against util-linux-2.11t

  patch-util-linux-2.11t-A projects | techreports | press | lab | location | staff Email address
or call +1 734 763 2929
Copyright © 1996-2013
The Regents of the University of Michigan