|
|
 |
Projects: NFS Version 4 Open Source Reference Implementation
|
|
|
Linux 2.4.0-test12 NFSv4 Distribution - March 2001 Release
This work was done as part of the
NFS Version 4 Open Source Reference Implementation project.
Download: Anonymous CVS
Anonymous CVS access to our current source is provided via SSH. Make
sure you have SSH installed
first, then
- setenv CVS_RSH ssh (or export CVS_RSH=ssh for sh,
bash, ksh, or zsh)
- cvs -d nfsv4@anoncvs.citi.umich.edu:/cvs checkout module
where module is one of
- linux-2.4.0-test12-nfsv4
- redhat_mount
- mit-krb5-1.2.1-mech
- rpcsec_gss
- export_parser
NOTE!
-
The spkm3 subdirectory in the mit-krb5-1.2.1-mech module will not be available for a while - the code is too young.
-
I have yet to integrate the Makefile creation in mit-krb5-1.2.1-mech/lib/gssapi/mechglue in that the configure process does not create a useable Makefile. So, you need to create a symlink to the Makefile.static to build the mechglue piece of libgssapi.a
-
The anonymous CVS access gives read only access to our development tree, and consequently is both up to date, and potentially in a wacked state! Please feel free to ask for help.
-
The /etc/exports format is different than v2/v3 - we'll write a bit of documentation for it soon.
-
The nfs4 start script (/etc/rc.d/init.d/nfs4) is very new and untested.
Installation
Linux 2.4.0-test12
- Save the current /usr/src/linux and replace it with linux-2.4.0-test12-nfsv4 package.
# cd /usr/src/
# mv linux linux.orig
# cvs checkout the linux-2.4.0-test12-nfsv4 module
# ln -s /usr/src/linux-2.4.0-test12-nfsv4 /usr/src/linux
-
To build the current client and server, do 'make xconfig' from the
top-level kernel source directory, and under "File systems->Network File
Systems", select:
NFS file system support --> n (no nfsv2/v3 client)
NFS server support --> n (no v2/v3 server)
NFSv4 file system support --> m (v4 client)
NFSv4 server support --> m (v4 server)
then do 'make dep bzImage modules' as usual.
- 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. There is still a bug in the make process - setproctitle.o is not found by make. We still recommend that you only use this mount for NFSv4, so rename to mount4.
# cd /usr/src/
# cvs checkout the redhat_mount module
# cd redhat_mount
# make mount - this will fail...
# cd lib ; ln -s ../setproctitle.o . ; cd ..
# make mount - this will succeed
# install -c -m 755 mount /usr/sbin/mount4
- Build and Install MIT krb5 with our GSS mechanism changes.
I put it in /usr/local/src. We have enabled the existing mit-krb5-1.2.1-mech/lib/gssapi/mechglue code, and added beginnings of spkm3. GSSD and the userlevel rpcsec_gss use this kerberos release.
# cd /usr/local/src
# cvs checkout the mit-krb5-1.2.1-mech module
# cd mit-krb5-1.2.1-mech
# ./configure (i use --with-cc=gcc)
# make
# make install
- Build and install the GSS daemon (gssd) from the rpcsec_gss
package. NOTE: the default krb5 install directory from step 9 is '/usr/local'
# cd /usr/src/
# cvs checkout the rpcsec_gss module
# cd rpcsec_gss
# ./configure --with-krb5=<krb5 install directory from step 9>
# make
# install -c -m 755 gssd/gssd /usr/sbin/gssd
- Build and install the NFSv4 export-parser and start script
# cd /usr/src/
# cvs checkout the export_parser module
# cd export_parser
# make
# install -c -m 755 exportfs4 /usr/sbin/exportfs4
# install -c -m 755 nfs4 /etc/rc.d/init.d/nfs4
- Build the nfs daemon startup program
# cd /usr/src/linux
# gcc nfs4start.c -o nfs4start
Configuration and Operation
Linux
Server
- Create an NFSv4 /etc/exports file
- Run exportfs4
The following is /etc/rc.d/init.d/nfs4's job - so, either run
- /etc/rc.d/init.d/nfs4 start
or
- Start GSSD.
Note: gssd as currently configured, runs in the forground, and prints some messages to the console, and some messages to /var/log/messages. In order to run correctly, gssd reads the client machine kerberos 5 credentials from /etc/krb5.keytab, looking for a principle/instance name of the form 'nfs/machine name'. /etc/hosts is read for the machine_name resolution. A common reason for gssd failing on start-up is a bad /etc/hosts locaal host stanza, which is the default on redhat installations, or a non-existant/bad /etc/krb5.keytab.
# /usr/sbin/gssd
Note: gssd prints debug statements.
- Load the necessary modules.
Note: 'make modules_install' installs the modules in
/lib/modules/2.4.0-test12/kernel/fs and net, and by default, some versions of 'insmod' will not find this directory (at least with my version of insmod), so you'll have to add the module locations to your MODPATH environment variable.
# insmod sunrpc
# insmod nfs4
# insmod nfsd4
- Start the server.
# /usr/src/linux/nfs4start
Client
- Start the GSS daemon.
Note: gssd as currently configured, runs in the forground, and prints some messages to the console, and some messages to /var/log/messages. In order to run correctly, gssd reads the client machine kerberos 5 credentials from /etc/krb5.keytab, looking for a principle/instance name of the form 'nfs/machine name'. /etc/hosts is read for the machine_name resolution. A common reason for gssd failing on start-up is a bad /etc/hosts locaal host stanza, which is the default on redhat installations, or a non-existant/bad /etc/krb5.keytab.
# /usr/sbin/gssd
Note: gssd prints debug statements.
- Load the necessary modules.
Note: 'make modules_install' installs the modules in
/lib/modules/2.4.0-test12/kernel/fs and net, and by default, some versions of 'insmod' will not find this directory (at least with my version of insmod), so you'll have to add the module locations to your MODPATH environment variable.
# insmod sunrpc
# insmod nfs4
# insmod nfs4fs
- Use the NFSv4-enabled mount4 to mount a directory from
the server.
 |
|
 |
|