First, please read the file COPYRIGHT.

You should have received:

COPYRIGHT
README
user
user/Makefile
user/pmapd.c
user/mountd.c
user/nfsd.c
user/nfs.h
user/nfs-xdr.c
user/rpc.h
user/syscalls.s
include
include/SYS.h
include/nfs.h
include/rpc.h
include/xdr.h
include/htable.h
include/malloc.h
include/syscall.h
librpc
librpc/rpc-xdr.c
librpc/Makefile
librpc/rpc.c
libxdr
libxdr/extra.c
libxdr/auxil.c
libxdr/float.h
libxdr/float.c
libxdr/filters.c
libxdr/primitives.c
libxdr/record.c
libxdr/generic.c
libxdr/memory.c
libxdr/striptags.c
libxdr/stdio.c
libxdr/Makefile
aux
aux/htable.c
aux/Makefile
aux/heapsort.c
aux/binsearch.c
sys
sys/h
sys/h/inode.h.patch
sys/h/stat.h.patch
sys/sys
sys/sys/init_sysent.c.patch
sys/sys/sys_inode.c.patch
sys/sys/ufs_inode.c.patch
sys/mnfs
sys/mnfs/mnfs.c


Before installing, I recommend you read over the instructions a few
times until you are familiar with the steps involved.  I also recommend
you make backup copies of everything that you modify, to make it easy
to back things out in case you have to or want to.

To install, first install the patches found in the sys subdirectory.
There are some patch files there; each of these is a patch that should
be applied to its corresponding file under /sys (for example,
h/inode.h.patch is a patch for /sys/h/inode.h).  Apply these patches
(you should probably keep copies of the originals so you can back
things out if you want to).  If you have Larry Wall's patch program,
you can feed the patches to it.  If not, you can get patch or simply
apply them by hand (none of them are very complicated).

Make a directory /sys/mnfs and copy the contents of sys/mnfs to it.
The Makefiles in some of the subdirectories assume that this directory
is called /sys/mnfs for purposes of a -I option so the compiler can
find three include files; you can change the name, but you will have to
change the Makefiles to match and you will have to change a file name
when editing the conf/files.MACHINENAME file during the kernel
installation.

As distributed, the mount daemon reads a file /local/etc/exports which
is similar to Sun's /etc/exports file.  If you wish to change the
pathname the mount daemon uses to find this file, edit user/mountd.c
and change the initialization of exportlist[], right at the top just
after all the includes (line 20 or so).

Now you can run `make' in each of the subdirectories aux, librpc,
libxdr, and user; but note that the other three must be finished before
it will succeed in user.  It is essential that you patch the .h files
in the previous step before attempting this step.

You now have the user level built.  Now to install the kernel changes.

First, configure it in.  In /sys/conf you should have a file named
after your machine (this is the argument you give to /etc/config).
Edit this file and add a line

options		MNFS

Now edit another file (create it if necessary) in /sys/conf,
files.MACHINENAME (where MACHINENAME is your machine's name), and add a
line

mnfs/mnfs.c		standard

Now rerun config and remake your kernel.  Test it, and when you are
sure that installing the kernel support hasn't broken anything, you can
continue.  (It is OK to have the line in files.MACHINENAME for a
non-NFS machine, because if the "options MNFS" line is not present,
mnfs.c is effectively empty.)  Notice that your machine name is
specified two places.  One is the name of the config file, the argument
you give to config, and the other is on the "ident" line in the config
file.  I am not sure which one config uses as the machine name when it
looks for the files.MACHINENAME file.

Time to try it.

First, create an exports file.  As distributed, this file is
/local/etc/exports; you may have changed the name in mountd.c.
Whatever the name is, create it.  It contains lines which look like

<path> <host> <host> ....

where <path> is a pathname and the <host>s are host names.  When a
mount request is received, the mount daemon reads this file a line at a
time looking for a matching <path>; the special path * matches
anything.  When a line with a matching <path> is found, the name of the
requesting system is matched against the <host>s.  If the requesting
system is listed, or if there are no hosts listed at all, the mount is
permitted; otherwise it is denied.

Note that this implies, for example, that it is useless to have lines
after a line with a <path> of "*", because the mount daemon will never
read past that point.

Comments in the exports file are introduced with # signs and extend
from the # to the end of the line.

In user you should have three programs built by the makes I told you to
run at the beginning.  These are pmapd, mountd, and nfsd.  They are,
respectively, the portmapper, the mount daemon, and the NFS daemon.

I will use "here#" and "elsewhere#" to indicate the machines on which
commands are to be issued.  "here#" indicates the NFS server machine
and "elsewhere#" indicates some other machine, the NFS client.

First run the portmapper:

here# pmapd

Now the mount daemon:

here# mountd

And the nfs daemon:

here# nfsd

Now you should be able to mount the machine from elsewhere:

elsewhere# mount -o rsize=1536,wsize=1536 here:/ /mnt

and do things with it

elsewhere# ls /mnt

The rsize and wsize options to mount are necessary because 4.3 limits
UDP datagrams to a size smaller than Sun uses for NFS.  This limit is
easy to raise; in netinet/udp_usrreq.c, change the values for the
udp_sendspace and udp_recvspace variables (on both the server and
client machines).  We have udp_sendspace set to 10240 and udp_recvspace
set to 20512 and find there's no need for the restricted rsize and
wsize.  The rsize and wsize can probably be bigger than above for stock
4.3, but I am not sure how much bigger.

If you have any problems, questions, whatever, just send me mail.

					der Mouse

				(mouse@mcgill-vision.uucp)
