Coda File System

Re: Cannot create volume..

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Fri, 8 Jun 2007 17:42:45 -0400
On Fri, Jun 08, 2007 at 03:44:06PM +0100, prashant wrote:
> The issue was with the realms which did not contain the server FQDN and 
> ipaddress
> 
> root_at_node2:/coda# more /usr/local/etc/coda/realms
> node2.bluebarracuda.eu 192.168.1.70
>
> I restarted the server and it was working.

The servers actually don't read the realms file, so the server restart
must have made the difference.

Are those ip-addresses statically assigned? Coda servers try to resolve
their own hostname during startup and use the ip address they have at
that time when a client asks where a volume is located.

Also, clog and venus, which do use the realms file only check
/etc/coda/realms although the install places it in /usr/local/etc/coda.

> root_at_node2:/coda# createvol_rep volume node2.bluebarracuda.eu
> and the following was created in the coda directory
> 
> root_at_node2:/coda# ls
> node2.bluebarracuda.eu@

Not related, you created a volume named 'volume' on a single server.

> and ROOTVOLUME in /vice/db/ROOTVOLUME
> 
> root_at_node2:/vice/db# more ROOTVOLUME
> /coda

But the server expects that the root volume is named /coda. So the
client is unable to mount a root volume named '/coda' at
/coda/node2.bluebarracuda.eu

You could either change /vice/db/ROOTVOLUME to contain the name of your
volume (i.e. echo volume > /vice/db/ROOTVOLUME), or you could create an
additional volume named '/coda' (i.e. createvol_rep /coda node2.blue...)

> root_at_node2:/coda# cfs mkmount node2.bluebarracuda.eu /web/
> .: File exists
> root_at_node2:/coda#

You cannot create your own mountpoints in /coda, it is a readonly volume
that tries to automount anything you try to look up. So in this case it
tried to lookup node2.blue... which created a temporary link, and as a
result it returned EEXISTS.

Besides your volume was named 'volume' so I'm not sure how it would find
a volume named '/web/' if you didn't create it.

> --- Is this the proper way to do it??
> 
> Basically i want to have a volume created in /coda - ie /coda/volume1
> And want all my client to RW access to this volume.

Create a root volume and make sure the server knows it's name,

    createvol_rep codaroot node2.bluebarracuda.eu
    echo codaroot > /vice/db/ROOTVOLUME

Now with a client you should be able to do,

    ls -l /coda/node2.bluebarracuda.eu

And that should show an empty directory, if it shows a symlink the realm
lookup failed and you should copy /usr/local/etc/coda/realms to /etc/coda/

Once you see an empty directory you can use the following to see the
name and some other information about the volume,

    cfs listvol /coda/node2.bluebarracuda.eu

Or check on which server(s) it is hosted with,

    cfs whereis /coda/node2.bluebarracuda.eu

Then if you want to add additional volumes you create them on the server,

    createvol_rep web node2.bluebarracuda.eu
    createvol_rep user node2.bluebarracuda.eu

And then if you are authenticated, mount them somewhere in the existing
volume,

    mkdir /coda/node2.bluebarracuda.eu/home
    cfs mkm /coda/node2.bluebarracuda.eu/web web
    cfs mkm /coda/node2.bluebarracuda.eu/home/user user

If everything worked correctly web and home/user will be empty
directories and cfs listvol and cfs whereis can be used to confirm that
these directories are part of the new volumes.

Jan
Received on 2007-06-08 17:44:52