Coda File System

Re: Automatic Failover

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Fri, 29 Apr 2005 14:53:56 -0400
On Fri, Apr 29, 2005 at 07:02:06PM +0200, Gilles Schlienger wrote:
> Hi everyone,
> 
> I'm thinking about using Coda for sharing files between client
> machines and a server.
> 
> Does anyone know if clients and servers can reconnect automatically
> without having to manually enter the command cfs disconnect and cfs
> reconnect...

Yeah, I actually only use disconnect/reconnect when I don't want to yank
the ethernet cable, yanking cables out of the machine actually makes for
a much more impressive demo than typing 'cfs mumble' and they saying
'look we're disconnected now'.

But a client will only retry for up to 60 seconds and then switch to
disconnected mode automatically. From then on it will reping the servers
about once every 5 minutes, maybe even a bit less than that, I'm not
entirely sure what the current probe interval is. If a server responds
to a ping the client will automatically rebind.

> I think, this would allow me to use Coda with 2 clients using the same
> files and if the server is down, the clients could still be running
> (having configured it to have all the necessary files on the clients?)

Yeah, that works, at least as long as the important stuff is locally
cached. One thing that often goes wrong with 'hoarding' is that when I
say,

    hoard add /coda/coda.cs.cmu.edu/usr/jaharkes/Mail 100:d+

Then yes, my client will make sure to fetch all my email, however it
doesn't hoard any of the volumes leading up to my email...

    /coda/coda.cs.cmu.edu -> vmm:root
	       <vmm:root>/usr -> vmm:usr
	            <vmm:usr>/jaharkes -> vmm:u.jaharkes
	              <vmm:u.jaharkes>/Mail -> vm:u.jaharkes.mail

So it will happily cache everything in vm:u.jaharkes.mail, but forget
that I actually need to traverse at least 3 more volumes before I get to
my mail.

So I tend to have some extra hoard rules,
    hoard add /coda/coda.cs.cmu.edu			100
    hoard add /coda/coda.cs.cmu.edu/usr			100
    hoard add /coda/coda.cs.cmu.edu/usr/jaharkes	100
    hoard add /coda/coda.cs.cmu.edu/usr/jaharkes/Mail	100:d+

100 is the hoard priority, it can be anywhere between 1 and 1000, but
doesn't really translate to a useful number since the actual priority of
an object is also based on how much time it took to fetch it and how
many times it has been accessed etc. So anything under 10 will probably
never get enough priority to stick in the cache, while some people
had to bump it all the way to 900 before their hoarded files would
stick.

Jan
Received on 2005-04-29 14:54:48