CODA IS BARELY READY FOR PRODUCTION USE. THIS RELEASE IS JUST FOR
THOSE INTERESTED IN EXPLORING THOSE FEATURES WHICH WORK. IT CONTAINS
KERNEL CODE, AND SERVERS RUNNING WITH ROOT PRIVILEGES, AND COULD LEAD
TO DATA LOSS.
To get Coda running you will go through 3 steps:
- Get a Coda enabled kernel for the client. (The server does not
need a special kernel)
- Configure and run the client cache manager Venus
- Configure and run the file server, authentication server and
- Connect a client to your new server.
Before you can use a Coda client you need a new filesystem driver in
your kernel. For the most part this driver redirects requests to the
user level cache manager venus. Precompiled modules exist
for commonly used kernels. If no module exists for you, you'll find
instructions below where to find it.
coda-fs-module-k2.?.?-c?.?.?.arch.rpm rpm package and
k2.?.? should match your kernel version (use uname
c?.?.? should match you Coda version.
Linux kernels change often and many people have custom kernels
for their environment. Our modules will generally only work on RedHat
Linux kernels and you may have to build a module for your kernel. Look
at the section building a kernel module.
You may obtain a Coda lkm from your FreeBSD distribution:
coda_mod.o is there already.
Otherwise, you may obtain a Coda lkm from the Coda site:
You then install the lkm with:
modload -v -e coda_mod -o /var/run/lkm.coda /lkm/coda_mod.o
You can build support for the Coda VFS layer into your kernel.
This is discussed later in the Building FreeBSD section.
NOTE: The GENERIC NetBSD kernel should have Coda enabled. Do
If this is present, you are done with this section. PROCEED NO
nm -o /netbsd | grep coda_open
If you need to load an lkm it should be in the NetBSD distribution:
Check if coda.o is there already.
Otherwise, you may obtain a Coda lkm from the Coda site:
You then install the lkm with:
modload -v -e coda_lkmentry -o /var/run/lkm.coda /usr/lkm/coda-1_3H.o
You can build support for the Coda VFS layer into your kernel, though
this should be automatic.
This is discussed later in the Building NetBSD section.
Windows 95 & NT
The kernel module is part of the Coda client installer.
These are partial instructions on how to setup and configure the Coda
filesystem. Refinements to the setup created here are discussed in
will probably not need these refinements in the first instance.
venus-setup script does all the hard work, it will setup the coda
control files, create
/dev/cfs0 to communicate with the
kernel, ... It also initializes a directory for cache files. In your
first Coda run we recommend a small cache, say 20MB. The cache size
should be at least 10Meg, typically 60-200Meg is used. Do not go
above 300Meg. All the files created will be placed under
/usr/coda. You should make sure that there is enough space
in the file system on which
/usr/coda resides to hold a fully
venus-setup <comma_separated_host_list> <cache_size_in_kb>
venus (below) are in
Make sure that
/usr/sbin is in your path or that you use
fully qualified pathnames. We strongly recommend that you initially try
testserver.coda.cs.cmu.edu as the
first, and keep the cache size to 20000.
venus-setup will edit
/etc/services to make
sure some additional services are registered.
The following assumes you are running X-Windows. However, you could
run these commands from virtual consoles as well, by omitting the
xterm -e in front of the commands below.
Start Venus with:
-init flag can be given when
venus is started; it flushes the
local cache contents.
venus-setup forces an init to happen when
venus is first started. The
-init flag can be given if Coda
cannot recover it's cache after a crash, or after editing the
vstab file manually.
Observe the venus log with:
It will tell you when venus has started and give status.
xterm -e tail -f /usr/coda/etc/console
to see the communications between the Venus and Vice.
xterm -e codacon &
It is possible to see the upcalls from the kernel to Venus by turning
up logging in Venus, but they are not very interesting. (To turn on
minimal debugging, type:
vutil -d 1
tail -f /usr/coda/coda.cache/venus.log.)
To halt venus, type:
Or you can kill -9 venus, if you must.
umount /coda (Linux only)
NOTES for Linux users:
- Before restarting Venus
be unmounted. If umounting
/coda gives trouble, make sure to
exit all process that hang on to the Coda filesystem, e.g. by having
files open or being cd'd into /coda. A utility like
fuser can help with this.
/proc/fs/coda has interesting Coda statistics.
- You can enable kernel debugging with
-kdebug 4095 and call tracing with
vutil ktrace 1. The
messages appear in
During installation you will be prompted for the IP address of
your Coda server(s). Enter this as indicated.
All executables can be found in the directory
The CodaStart program is a Win32 windows-based application to control and
observe the Windows 95 Coda client. It will be enhanced in the future. For now
it provides a convenient way to start Venus.exe.
It also displays the kernel-venus communication for debugging purposes.
Printing the messages can be stopped by unticking the 'Monitor' check box. The
button 'Reset' clears the display.
- When you start Venus for the first time, or you want to reinitialize its
cache, tick the 'Init Venus' check box. This will start Venus with the '-init'
and '-cf 1500' flag set. To add or override flags use the 'Configure' button.
Start Venus by clicking the left 'Start' button. The 'Status' message will
tell you 'Running' when Venus starts.
- Coda will be mounted automatically on the drive specified in the
Vstab is created by the installer.
- To unmount, type
cfs uk in a DOS window. This will cleanly shut down Venus as well.
- See 'Important Note' below, please.
You are now ready to browse through the Coda filesystem using the explorer!
NOTE: In some installations the DPMI DOS Extender window suspends when
it is not active. In this case untick the window property 'Properties->Misc->
Background->Always Suspend'. If it is unticked, ticking and unticking it again
might help. Also untick the 'Termination' flag, to allow Coda to automatically
shutdown, when the system shuts down. For your convenience tick the 'Close on
Exit' check box in the 'Program' tab.
Configuring your server
To set up an SCM server, you will run a script vice-setup. This
script creates configuration files under the
directory and creates files and directories on your system for storage
of file data and metatdata. To answer the questions vice-setup
is asking you need to have the following thought through:
- file space
an empty directory (viz /vicepa) where the fileserver
will put files. There must be as much free space on this filesystem
as the data you wish to store in Coda.
- RVM metadata storage
a file or raw partition for RVM metadata.
You can use a file but it will be quite slow on a larger server. This
partition must be around 4% of the total size of the files you wish to
store under /vicepa (e.g. on a 2GB server we use around 80M of rvm
data). For first installations we recommend the default 22M options,
and using files for RVM log and data. (NOTE: Windows NT Setup
creates the file c:\coda\rvm\DATA. Use this for RVM metadata.)
- virtual memory
The metadata, held in the RVM data file, is
memory mapped. You need that amount of space as virtual memory on
your system, in addition to virtual memory to run the server ( 6MB)
and other software.
- RVM transaction log
a LOG file, preferably a raw partition on a
disk by itself. This needs not be large, a few M's are fine. (NOTE:
Windows NT Setup creates the file c:\coda\rvm\LOG. Use this for RVM
- A server number
All servers in a coda cell need to have a unique number to identify
them. The servername to identifier mappings have to be defined by the
administrator in the file
/vice/db/servers on the SCM. The
format of this file is as follows:
There are currently several limitations to which identifiers are
This leaves us with a usable range of 1-126 and 128-254 for server identifiers.
- all numbers must fit in a single byte.
- 0 and -1 (255) are used in error conditions.
- 127 is used to identify `replicated volumes'.
- secret tokens
two secret tokens of _exactly_ 8 characters (eg
- Coda administrator
The uid and name for the user that will get
administrative priviledges on the Coda Filesystem. This user should NOT be the
root user (uid 0). The authentication password for this user will be set
to `changeme', and can be changed later using either
cpasswd -h <scm
au -h <scm hostname> cp.
NOTE: you are now ready to run the setup script. We
strongly recommend that you stick to default choices offered as
configuring a server differently is quite difficult.
and answer its questions. Note down the commands that vice-setup
prints out for you at the end.
Note: For Windows NT you will need the Cygwin B19 Shell which can
be started from the "Start" menu. The shell uses the c:\coda directory as the
root mountpoint "/".
Start the rpc2portmap server, update server, client and the auth
server, as well as the fileserver by typing:
/etc/rc.vice start, or
- Windows NT
Now observe the log:
xterm -e tail -f /vice/srv/SrvLog &
SrvLog should show File Server started. If not,
you have a problem.
updateclnt are running.
Making your root volume
During your configuration session, you commmunicated a name for the
root volume to the program. This root volume now needs to be
created: the precise command to do this was printed out by the
vice-setup program, below we assume your file space is in
/vicepa, and your root volume is
createvol_rep coda:root E0000100 /vicepa
E0000100 is the Volume Storage Group set up for you by
vice-setup. With more servers you can define other groups in
/vice/db/VSGDB -- see the Coda User Manual.
Now you are ready to point a Venus (client) at this server. You do
this by typing
NOTE: Windows 95 users should type the IP address and not the
hostname of the server.
venus-setup server-name cache-size-in-kb
Start Venus as explained above. From the coda client side, the root
volume will appear under /coda. To use it you must now authenticate
to Coda, since it is write protected.
The vice-setup program installed an administrative Coda user on the
server. It has a uid you chose and has been assigned password
changeme. You may clog into Coda with this uid:
Validate that you have tokens with the
You can now create files in
coda, because the administrative user
is on the access control list (ACL) of the
directory. Read the next section to find out how to do more with Coda.