NFSv4 Version 2.0 Distribution - sept_2000_rel
This work was done as part of the
NFS Version 4 Open Source Reference Implementation project.
Download
Source code for the Linux and OpenBSD NFSv4 implementations may be
downloaded via
HTTP or anonymous CVS.
Installation
OpenBSD
- Replace kernel NFS source with our NFSv4 tree:
# cd /usr/src/sys
# mv nfs nfs.orig
# cp -r /tmp/openbsd_nfsv4/nfs nfs
- Apply patches/files.patch:
# cd /usr/src/sys
# patch < /tmp/openbsd_nfsv4/patches/files.patch
- Add options to kernel config:
option NFSV4
option NFSV4_DEBUG
- Remove options from kernel config:
#option NFSSERVER
- After configuring kernel compilation directory using config(8),
remove "-Werror" from CDIAGFLAGS in the resulting Makefile.
- Build a new kernel (make depend; make)
- Build NFSv4-enabled mount_nfs (cd mount_nfs; make)
Linux
- Replace the Linux kernel source with the linux_nfsv4 package.
# mv /usr/src/linux /usr/src/linux.orig
# mv linux_nfsv4 /usr/src
# ln -s /usr/src/linux_nfsv4 /usr/src/linux
- Run /usr/src/linux/xconfig. Choose NFS, NFSD, and SUNRPC
to be built as modules. You need to change the Network File Systems
portion of the resulting /usr/src/linux/.config to look like
this:
CONFIG_NFS_FS=m
CONFIG_NFSD=m
CONFIG_SUNRPC=m
CONFIG_NFS_V4=y
# CONFIG_LOCKD is not set
# CONFIG_NFS_V3 is not set
- Add -DCONFIG_NFS_V4 to the CFLAGS variable in
/usr/src/linux/Makefile. This enables all NFSv4 related
kernel changes.
CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DCONFIG_NFS_V4
- 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:
image=/boot/vmlinux-nfsv4
- Run lilo.
- Build and install all kernel modules.
# cd /usr/src/linux
# make modules
# make modules_install
- Build and install the NFSv4-enabled mount program, in the
redhat_mount package.
# cd /usr/src/redhat_mount
# cd lib ; ln -s ../setproctitle.o . ; cd ..
# make mount
# install -c -m 755 mount /usr/sbin/mount4
- Install MIT krb5.
# rpm -i -v ftp://rpmfind.net/linux/redhat/redhat-6.2/i386/RedHat/RPMS/krb5-configs-1.1.1-9.i386.rpm
# rpm -i -v ftp://rpmfind.net/linux/redhat/redhat-6.2/i386/RedHat/RPMS/krb5-libs-1.1.1-9.i386.rpm
# rpm -i -v ftp://rpmfind.net/linux/redhat/redhat-6.2/i386/RedHat/RPMS/krb5-devel-1.1.1-9.i386.rpm
# rpm -i -v ftp://rpmfind.net/linux/redhat/redhat-6.2/i386/RedHat/RPMS/krb5-workstation-1.1.1-9.i386.rpm
- Build and install the GSS daemon (gssd) from the rpcsec_gss
package.
# cd /usr/src/rpcsec_gss
# ./configure ; make
# install -c -m 755 gssd/gssd /usr/sbin/gssd
Configuration and Operation
OpenBSD
Follow the instructions detailed in the openbsd_nfsv4 package's
README file.
Linux
For more information, check out the
Linux
release documentation.
Server
- Download
the init.d run script, and accompanying executables. The README tells file
locations.
- Load the necessary modules.
# insmod sunrpc
# insmod nfsd
- Start the server.
# /etc/rc.d/init.d/nfsv4 start
Client
- Start the GSS daemon.
# /usr/sbin/gssd &
- Load the necessary modules.
# insmod sunrpc
# insmod nfs
- Use the NFSv4-enabled mount4 to mount a directory from
the server.