As a file system, Coda has several major components that need to be built:
We now have a reaonably flexible method to build kernel modules. You can build the module for a kernel which you are not running at the time of the build.
First of all get the linux-coda-?.?.?.tgz archive from
ftp://ftp.coda.cs.cmu.edu/pub/coda/src/
. You can unpack this
anywhere on your target system.
Prepare the kernel tree
You do need a kernel tree handy, to give the module header information. To get ready:
make oldconfig
make dep
In the top directory of linux-coda build the coda.o module:
make config --- answer the questions
make coda.o
su
make install
depmod -a
Notes
Coda builds most easily on glibc systems. We do not actively
maintain the libc
variant anymore. You will need several
libraries to link the Coda binaries, and include files from some of
the lib???-devel packages. Readline and termcap are probably the most
important ones.
To build:
coda-?.?.?.tgz
.
The Coda kernel files are in the FreeBSD -current kernel sources. All you need to do to get a Coda capable kernel is to build a configuration that includes Coda. The lines to enable Coda are not in the GENERIC. There are several Coda lines in the LINT file that you need to copy. In the i386/conf directory type:
grep -i coda LINT
It currently gives:
# Coda stuff:
options CODA #CODA filesystem.
pseudo-device vcoda 4 #coda minicache <-> venus comm.
Add these lines (or whatever the grep
yields) to the GENERIC kernel
configuration or your standard personal configuration. You might also
want to turn on DDB and BPF.
I'll assume you call the new config file CODA. You type:
config CODA
Then cd
to the build area and do a make
:
cd ../../compile/CODA
make
Finally, as root install the kernel with:
make install
Alternatively, you could just build an lkm for Coda and insert it into the kernel. To do that you:
cd /usr/lkm/coda
and type:
make
make install
This will build coda_mod.o and copy it to /lkm. You load it by typing:
modload -v -e coda_mod -o /var/run/lkm.coda /lkm/coda_mod.o
Remember, when using an lkm:
cd /usr/ports/net/coda_client
make install
cd /usr/ports/net/coda_server
make install
NOTE: The client and server each need about 85Meg for the work area and another 15Meg to install. They are compiled -g for debugging.
First, you need several external packages to build coda: gnu make
,
gdbm
, readline
, and perl
.
You can grab any of our (latest) sources from ftp://ftp.coda.cs.cmu.edu/pub/coda/src. For this example, I'll assume that you have obtained sources for Coda release 4.6.6. NOTE: On our ftp site there are also beta, alpha, and less stable source releases available for the daring.
Untar the source into your favorite build area.
(I am assuming this is /usr/coda
.)
tar zxfv coda-4.6.6.tgz -C /usr/coda
Cd
to /usr/coda
and
mkdir obj
This is where we will build the binaries. Now cd
into obj
and type:
../coda-4.6.6/configure
This will use the gnu configure system to configure and to shadow the sources that were
installed in /usr/coda/coda-4.6.6.
Finally, assuming you named the gnu make, gmake, type:
gmake coda
To install the client suite type:
gmake client-install
To install the server suite type:
gmake server-install
The Coda kernel files are in the NetBSD -current kernel sources. All you need to do to get a Coda capable kernel is to build a configuration that includes Coda. The lines to enable Coda may not be in your configuration. They should be in GENERIC, though they may be turned off. Enable them and/or copy them to your configuration file. They should look like.
file-system CODA # Coda File System
pseudo-device vcoda 4 # coda minicache <-> venus comm.
But whatever is in GENERIC will be more up to date.
I'll assume you call the new config file CODA. You type:
config CODA
Then cd
to the build area and do a make
cd ../compile/CODA
make
Then just copy netbsd
to root.
Alternatively, you could just build an lkm for Coda and insert it into the kernel. To do that you:
cd /usr/sys/lkm/vfs/coda
and type:
make
make install
This will build coda.o and copy it to /usr/lkm. You load it by typing:
modload -v -e coda_lkmentry -o /var/run/lkm.coda /usr/lkm/coda.o
Remember, when using an lkm:
cd /usr/pkgsrc/net/coda_client
make install
cd /usr/pkgsrc/net/coda_server
make install
NOTE: The client and server each need about 85Meg for the work area and another 15Meg to install. They are compiled -g for debugging.
First, you need several external packages to build coda: gnu make
,
gdbm
, readline
, and perl
.
You can grab any of our (latest) sources from ftp://ftp.coda.cs.cmu.edu/pub/coda/src. For this example, I'll assume that you have obtained sources for Coda release 4.6.6. NOTE: On our ftp site there are also beta, alpha, and less stable source releases available for the daring.
Untar the source into your favorite build area.
(I am assuming this is /usr/coda
.)
tar zxfv coda-4.6.6.tgz -C /usr/coda
Cd
to /usr/coda
and
mkdir obj
This is where we will build the binaries. Now cd
into obj
and type:
../coda-4.6.6/configure
This will use the gnu configure system to configure and to shadow the sources that were
installed in /usr/coda/coda-4.6.6.
Finally, assuming you named the gnu make, gmake, type:
gmake coda
To install the client suite type:
gmake client-install
To install the server suite type:
gmake server-install
WARNING: The software provided to run Coda on Windows 95 is an early pre-alpha snapshot, made available to those interested. Coda runs kernel level code and priviliged processes which can cause damage to your system. Backup all data before playing with Coda.
Coda for Windows was made possible through a major effort by Michael
Callahan mjc@stelias.com
. Michael extended the DOS protected
mode environment with memory mapping and TCP/IP socket support (this
involves both Windows kernel support as well as low level support in
DJGPP start libraries). He also wrote a kernel module for Coda.
Michael's work was further debugged, extended and packaged by the Coda
team.
Short rationale
Why DOS applications?? It would seem more straightforward to implement the Coda client cache manager, a user level program named Venus, as a Win32 application. Sadly on Windows 95 we ran into the following (fairly well known) problem. When a user application calls a Win32 file system call, the application may acquire a mutex in a win16 system dll. The request should reach the kernel, and make its way up to Venus. Venus is then unable to service the request because it cannot grab the mutex. Deadlock results. (See Schulman's, Unauthorized Windows 95, IDG.)
Implementing all of Venus as a kernel level cache manager seemed an invitation for disaster. Instead, by running the cache manager in a virtual DOS machine, as a DOS Protected Mode Interface application, one can bypass these problems, since such applications do not share the Windows dynamic libraries which gain the mutex. The price of following this path is high. There was no freely available socket support for such DPMI applications and no memory mapping support. These are provided by Michaels VXD's and standard library calls are now incorporated in the DJGPP toolchain.
What do you need:
Get the latest tarball of Coda sources. Example: ftp://ftp.coda.cs.cmu.edu/pub/coda/src/coda-?.?.?.tgz.
You can rebuild Venus under Linux with
./configure --host=windows95
make
and the client utilities and server with
./configure --host=nt
The Venus built here is for NT and is not usable on Win95.
What do you need:
Note:The 95DDK needs the VC2.0 linker, which is on the 95DDK in the directory MSVC20 (also get the files Link.err and DBI.DLL, that will be needed by the linker). You'll also need the latest MS assembler 6.11 which is on the 95DDK in the directory MASM611C.
The sources for the VxD's you will build are in: ftp://ftp.coda.cs.cmu.edu/pub/coda/src/win95-coda-5.2.0.zip. To build sock.vxd you'll need the header files provided by microsoft and can be found in VXDTDI.ZIP. You'll have to learn how to build VxDs, which can be done from Developer Studio:
Use the Developer Studio Project "95projects". Build the VXDs one by one. Build CodaStart for a more convenient way to stat Coda.
/coda:/dev/cfs0:<ip adress of server 1>,..,<ip adress of server n>,<cachesize>:1
Use
/coda:/dev/cfs0:128.2.209.213:100000:1
to work with the CMU-testserver. c:\usr\coda\bin
to the PATH environment variable
in c:\autoexec.bat
.You are now at the point where the installer would have left you. To start Coda read the section Windows95: Starting and Configuring a Coda client.
Note: At present there is no client kernel source code available yet. We will release some very experimental binaries soon. When are a little further with it, we will release the sources, of course.
You can however build a Venus (which you can with the supplied kernel Coda FSD for NT) and you can build a server.
Coda has alpha support for Coda servers running on NT and Windows 95. The Win32 binaries are constructed using the Cygnus Win32 kit, which effectively translates Unix system calls to Win32 calls.
We build the Win32 binaries on Linux workstations using a cross compiler, just for our convenience. At the moment this is not for the faint of heart, since quite a few things have to be done by hand. Of course we encourage playing and will try to help and fix bugs.
You will need:
./configure --host=nt
make coda
Native building should be possible; you'll have to make a few changes to configs/coda.m4 and create a new configs/Makeconfig.ntnative file; then run autoconf and get cracking. But don't you dare send us patches with ^M characters made by Windoze machines!
C:\cygwin\cygwin-b20\H-i586-cygwin32\bin\cygwin1.dll
with the one from:
ftp://ftp.coda.cs.cmu.edu/pub/coda/support/nt-patches
or directly from cygnus. The version of cygwin1.dll must be from 01/15/99 or
newer.
c:\
. Change this to c:\coda
by typing:
umount /
mount -b C:\coda /
The -b, for binary mounting is vital.
SET HOME=C:\Coda
in the file cygnus.bat
somewhere in the Cygwin path.
You can also create the file .bashrc
in the c:\coda
directory
which gets called, when the Cygwin shell gets started. We set the export path
(described below) and cd to the home directory that way.
/bin/sh
and export the path by
typing:
mkdir /bin /vice /rvm /vicepa /tmp
touch /rvm/LOG
touch /rvm/DATA
cp //c/cygwin/cygwin-b20/H-i586-cygwin32/bin/bash /bin/sh
export PATH=/bin:$PATH
cd //H/
cp * /bin
or use the Windows Explorer. The binary files might not have the extension
.exe
. In that case just change the name, but distinguish between
bash shell scripts and binaries.You are now at the point where the installer would have left you. To configure and start the server read the section Codaserv -- the server.