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 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

  1. Replace kernel NFS source with our NFSv4 tree:
    	# cd /usr/src/sys
    	# mv nfs nfs.orig
    	# cp -r /tmp/openbsd_nfsv4/nfs nfs
    
  2. Apply patches/files.patch:
    	# cd /usr/src/sys
    	# patch < /tmp/openbsd_nfsv4/patches/files.patch
    
  3. Add options to kernel config:
    	option	NFSV4
    	option	NFSV4_DEBUG
    
  4. Remove options from kernel config:
    	#option	NFSSERVER
    
  5. After configuring kernel compilation directory using config(8), remove "-Werror" from CDIAGFLAGS in the resulting Makefile.
  6. Build a new kernel (make depend; make)
  7. Build NFSv4-enabled mount_nfs (cd mount_nfs; make)

Linux

  1. 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
    
  2. 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
    
  3. 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
    
  4. Build the kernel.
    	# cd /usr/src/linux
    	# make dep
    	# make bzImage
    
  5. Install the kernel.
    	# cp /usr/src/linux/System.map /boot/System.map-nfsv4
    	# cp arch/i386/boot/bzImage /boot/vmlinux-nfsv4
    
  6. Add a stanza to /etc/lilo.conf with an image to match your kernel installation:
    	image=/boot/vmlinux-nfsv4
    
  7. Run lilo.

  8. Build and install all kernel modules.
    	# cd /usr/src/linux
    	# make modules
    	# make modules_install
    
  9. 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
    
  10. 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
    
  11. 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

  1. Download the init.d run script, and accompanying executables. The README tells file locations.
  2. Load the necessary modules.
    	# insmod sunrpc
    	# insmod nfsd
    
  3. Start the server.
    	# /etc/rc.d/init.d/nfsv4 start
    

Client

  1. Start the GSS daemon.
    	# /usr/sbin/gssd &
    
  2. Load the necessary modules.
    	# insmod sunrpc
    	# insmod nfs
    
  3. Use the NFSv4-enabled mount4 to mount a directory from the server.
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