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.
Apply any appropriate patches and configure and build the kernel, making sure to select, at a minimum:
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
mkdir /var/lib/rpc_pipes mount -trpc_pipefs none /var/lib/rpc_pipesand start idmapd:
idmapd -p/var/lib/rpc_pipes/nfs/ &
Apply the appropriate patches and configure and build the kernel, making sure to select, at a minimum:
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
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
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.