projects techreports press lab location staff
citi top.2 top.3
citi mid.3
bot.1 bot.2 bot.3
star

Projects: NFS Version 4 Open Source Reference Implementation

NFSv4 for linux 2.5 kernels

Basic support for NFSv4 is included in recent 2.5 kernels, but we maintain patches against the kernels that may from time to time add features of bugfixes not yet accepted into the kernel.

This is work in progress, and may be only very lightly tested before release; the intended audience is developers and users interested in testing NFSv4.

To use ACL's on the client, make sure the basic ACL utilities (getfacl, setfacl, etc.) are installed on your client. For the server, note that the exported filesystem may need to have the "acl" option added to its mount options. ACL support (for NFSv4 in the case of the client, for the backing filesystem in the case of the server) must be built into the kernel.

Download the most recent NFSv4 patches from this directory.

See also information about rpcsec_gss on linux, which provides improved security for NFSv4 as well as earlier versions of NFS.

Client-side instructions

Apply any appropriate patches and configure and build the kernel, making sure to select, at a minimum:

  • Code maturity options->Prompt for development and/or incomplete code/drivers
  • File systems->Network File Systems->NFS file system support
  • File systems->Network File Systems->Provide NFSv3 client support
  • File systems->Network File Systems->Provide NFSv4 client support

Download a recent version of util-linux, apply a mount patch, and compile and install a new version of the mount program.

After rebooting to the new kernel, you should be able to mount a filesystem exported by an nfsv4 server as follows:

mount -tnfs4 server:/path/to/export/ /path/to/mountpoint

However, user identities will not be mapped correctly; for this, download idmapd-1.5.tar.gz, unpack it, build it (with configure && make), mount the rpc_pipefs filesystem:


mkdir /var/lib/rpc_pipes
mount -trpc_pipefs none /var/lib/rpc_pipes
and start idmapd:

idmapd -p/var/lib/rpc_pipes/nfs/ &

Server-side instructions

Apply the appropriate patches and configure and build the kernel, making sure to select, at a minimum:

  • Code maturity options->Prompt for development and/or incomplete code/drivers
  • File systems->Network File Systems->NFS server support
  • File systems->Network File Systems->Provide NFSv3 server support
  • File systems->Network File Systems->Provide NFSv4 server support

Download a recent version of nfs-utils (at least 1.0.5), and compile and install the mountd and exportfs programs.

Download idmapd-1.5.tar.gz, unpack it, build it (with configure && make), and install it.

Mount the rpc_pipefs and nfsd filesystems:


mkdir /var/lib/rpc_pipes/
mount -trpc_pipefs none /var/lib/rpc_pipes/
mount -tnfsd none /proc/fs/nfs

Start mountd and idmapd:


mountd &
idmapd -p/var/lib/rpc_pipes/nfs/ &

To export a directory /export/testdir to testclient.foo.org, do:


mount --bind /export/testdir /var/lib/nfs/v4root/test
exportfs -o rw,fsid=0 testclient.foo.org:/var/lib/nfs/v4root
exportfs -o rw,nohide testclient.foo.org:/var/lib/nfs/v4root/test

You also should make sure nfsd is running; your distribution may provide a start-up script, or you can start it by hand with something like /usr/sbin/rpc.nfsd 8.

Then testclient.foo.org should then be able to mount yourserver.foo.org:/test/. Additional exports will require one mount --bind and one exportfs each.

Have fun! Let us know if something doesn't work.

blank.space
b.star projects | techreports | press | lab | location | staff Email address
or call +1 734 763 2929
Copyright © 1996-2013
The Regents of the University of Michigan
bottom.line
citi