Coda File System

Re: Replication not automatic

From: Jan Harkes <>
Date: Thu, 14 Jun 2007 15:01:12 -0400
On Thu, Jun 14, 2007 at 06:13:54PM +0100, prashant wrote:
> I have currently node2 doing replication of a volume from node1 which is 
> th SCM.
> Both nodes has their client installed on the same machine and connecting 
> to their respective server.
> When i am updating a file on node1 - i am expecting to to see the update 
> happening on node2.
> But this only happens when read the file from node1 then i find the file 
> being update on node2.
> Is it a normal behavior or something not configured properly.

I think the problem is that you are treating both nodes as separate
servers. i.e. you are accessing both /coda/ and

Although it seems to work it is not really supported. The problem is
that both of these 'mounts' are different views on the same realm and
the servers don't see them as separate. When you access a file through
/coda/ and then look at /coda/
as far as the servers is concerned the same client just fetched the same
file twice. And because the server doesn't realize the client is using
serveral views for the same realm it doesn't send callbacks when it
receives an update in one of the two views (and doesn't send enough
callbacks when another client makes an update).

What you really want is to abstract out the fact that there are
different servers that can be contacted for volume information, which
has the added benefit that at the same time it makes the client able to
cope with either of your servers going offline.

The simplest would be to have a file /etc/coda/realms that contains the
following line,


In your case that would be,

If you can add DNS records for your domain you could also add DNS SRV
records so that you don't have to add that line to the coda/realms file.

Once you have the /etc/coda/realms line or DNS SRV records you can
access your realm as follows,

    ls /coda/

The Coda client will then try to contact either node1 or node2 whichever
is available whenever it wants to know where volumes are located. The
volume databases are available on all Coda servers (/vice/db/VLDB and
VRDB files) so if you add a node3 it doesn't have to be added because
the existing nodes can get the location information for any node3
volumes from those databases.

You probably want to try to flush all objects visible through the node1
and node2 realm mounts to make sure the server will end up sending
callbacks to the correct realm mount. cfs fl /coda/node* should do the
trick, otherwise restart venus with the -init flag to get rid of any
persistent state.

Received on 2007-06-14 15:02:43