On Wed, Jun 20, 2007 at 02:21:57PM +0100, prashant wrote:
> HI All,
> 
> I am trying to have a volume outside /coda but mounting it on 
> /coda/web1.bluebarracuda.eu/
> 
> Explanation:
> 
> I am trying to have /usr/local/apache2/htdocs/www as a volume

Eh? You can have a volume in /coda, but Coda cannot make things appear
outside of that mountpoint.

What you could do is use a symlink,

    ln -s /coda/.../www /usr/local/apache2/htdocs/www

> [EMAIL PROTECTED]:/usr/local/etc# createvol_rep /usr/local/apache2/htdocs/www 
> web1.bluebarracuda.eu
...
> Replicated volumeid is 7f000001
> creating volume /usr/local/apache2/htdocs/www.0 on web1.bluebarracuda.eu 

Ok, so you created a volume with a long and complicated name which is
singly replicated and the replica is stored on the server named web1.
This name is actually really close to the limit on volumes names of at
most 31 characters. The name of the underlying volume replica actually
ended up at exactly 31 characters, so that was cutting it pretty close.

> I mounted the volume
> >[EMAIL PROTECTED]:/coda/web1.bluebarracuda.eu# cfs mkm 
> >/coda/web1.bluebarracuda.eu/www /usr/local/apache2/htdocs/www
> >[EMAIL PROTECTED]:/coda/web1.bluebarracuda.eu# ls
> >www/
> >[EMAIL PROTECTED]:/coda/web1.bluebarracuda.eu/www# touch index.html

Ok so you mounted the new volume as /coda/.../www, and you created a
file in there.

> But when creating a file in /coda/web1.bluebarracuda.eu/www
> 
> Its not linked to /usr/local/apache2/htdocs/www/

How would it do that? The volume name could just as well have been
'frobaz', that wouldn't have created anything outside of the /coda
namespace either.

But you can replace the /usr/local/apache2/htdocs/www diretory with a
symlink that points at the volume you mounted at /coda/.../www.

> >[EMAIL PROTECTED]:/coda/web1.bluebarracuda.eu/www# ls -al 
> >/usr/local/apache2/htdocs/www/
> Volume details from VRList is
> 
> [EMAIL PROTECTED]:/usr/local/apache2/htdocs/www# more /vice/db/VRList
> / 7f000000 1 02000001 00000000 00000000 00000000 00000000 00000000 
> 00000000 00000000 0
> /usr/local/apache2/htdocs/www 7f000001 1 02000002 0 0 0 0 0 0 0
> 
> [EMAIL PROTECTED]:/usr/local/apache2/htdocs/www# more /vice/db/ROOTVOLUME
> /usr/local/apache2/htdocs/www/

What exactly did you do to the ROOTVOLUME file? In your case it should
probably contain just the character '/'. Now any client that is
reinitialized will mount the new www volume at the top level directory
of your realm. So a reinitialized client will see something like the
following,

    $ ls /coda/web1.bluebarracuda.eu
    index.hml

Jan

Reply via email to