NFSv4 Version 3.0 Distribution - feb_2002_rel
This work was done as part of the
NFS Version 4 Open
Source Reference Implementation project. This release is in the form
of a patch against the Linux-2.4.4 kernel.
Code Level and Management
This is new code, and we expect bugs. We will be testing this code
at Connectathon 2002 and will be releasing new versions of this patch with
high frequency until Connectathon 2002 is over.
Unlike past releases,
we then intend for the general Linux community to participate in
bug fixes and code development. The NFSv4 client code is ahead of the server
code, which needs a code review and cleanup.
Download
The main NFSv4 client and server patch for Linux-2.4.4 kernel comes in several versions.: |
|
|
|
The NFSv4 utility source: |
nfsv4_utilities.tar.gz |
For RPCSEC_GSS functionality, see the rpcsec_gss patch page. |
For ACL functionaly, see the nfsv4_acl patch page. |
(NOTE: Coming soon!) |
Installation
Note: the following instructions for the main patch apply to all main patch versions.
-
Apply the linux-2.4.4-nfsv4-3.0.patch to the stock Linux-2.4.4 kernel.
NOTE: some versions of the patch program will generate a
spurious
warning about a possible reverse hunk. Just answer "no" (the default) when
asked if patch should assume -R, and answer "yes" (not the
default) when asked if patch should apply the patch anyway.
# cd /usr/src/linux
# patch -p1 < linux-2.4.4-nfsv4-3.0.patch
-
Run make xconfig. Set "NFS file system support" to "n". Set
"NFS server support" to "n". Set "NFSv4 file system support" to
"m". Set "NFSv4 server support" to "m". The linux-2.4.4-nfsv4-30.patch
does not include the RPCSEC_GSS code - that is in the rpcsec_gss patch.
Set "RPCSEC_GSS support" to "n". The resulting /usr/src/linux/.config
should look like this:
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
CONFIG_NFS4_FS=m
CONFIG_NFSD4=m
# CONFIG_LOCKD is not set
CONFIG_NFS4=m
CONFIG_SUNRPC=m
# CONFIG_SUNRPC_GSS is not set
-
Build the kernel.
# cd /usr/src/linux
# make dep
# make bzImage
-
Install the kernel.
# cp /usr/src/linux/System.map /boot/System.map-nfsv4
# cp arch/i386/boot/bzImage /boot/vmlinux-nfsv4
-
Add a stanza to /etc/lilo.conf with an image to match your kernel
installation.
-
Run lilo, and reboot.
-
Build and install all kernel modules.
# cd /usr/src/linux
# make modules
# make modules_install
-
Unpack, build, and install the nfsv4 utilities in
nfsv4_utilities.tar.gz.
Note: The instructions below assume that Kerberos 5
is installed under /usr/kerberos, because so far we only
build under RedHat 7.x. RedHat 7.2 only comes with kerberos5 "workstation," which is the binaries and shared libraries. To build and run GSSD you need krb5 "devel," which is include files and non-shared libs. It's krb5-devel-1.2.2-13.i386.rpm on the second RedHat CD.
The RPCSEC_GSS patch will require our enhanced
version of Mit's Kerberos v5-1.2.1.
Also, we recommend
installing the nfsv4-enabled mount under another filename
such as mount4, so as not to replace the built-in
mount on your system.
# cd /usr/src
# tar -zxvf nfsv4_utilities.tar.gz
# cd nfsv4_utilities/export_parser
# make
# make install
# cd nfsv4_utilities/rpcsec_gss
# ./configure --with-krb5=/usr/kerberos
# make
# cd gssd
# install -c -m 755 gssd /usr/sbin/gssd
# cd /usr/src/nfsv4_utilities/mount-2.11n
# make
# install -c -m 755 mount /usr/sbin/mount4
Configuration and Operation
Server
-
Create an /etc/exports file, following the directions.
NOTE that without RPCSEC_GSS, the /etc/exports sec:: options are not valid.
-
Start the server. This will load the modules, start gssd, and
run /usr/sbin/exportfs4 to start the nfsv4 server(s). The nfs4 startup
script is installed as part of the nfsv4_utilities/export_parser installation.
# /etc/rc.d/init.d/nfs4 start
Client
-
Start the GSS daemon. NOTE: the '-n' option is needed when RPCSEC_GSS
is not enabled.
# /usr/sbin/gssd -n &
-
Load the necessary modules.
# insmod sunrpc
# insmod nfs4
# insmod nfs4fs
-
Use the NFSv4-enabled mount4 to mount a directory from the server.