Coda File System

Final explanation about server replication?

From: Valerio Morettini <swan_at_multiplayer.it>
Date: Fri, 16 Nov 2001 19:10:42 +0000
Hi all,
I'm trying to build a small (2 webservers) cluster for load balancing and
I thought coda could be the right choice by setting up two coda servers
(no clients at all) with just one replicated volume (the www area).
I thought this allowed real-time mirroring of the www area.

After a  couple of days I spent trying to set up this apparently simple configuration,
i've given up. Documentation is very unclean to me, and searching through the ml I
found nothing REALLY precise about this.

Since www data mirroring is quite a common scenario, i'm posting here the steps i took
while trying to setup the servers, hoping that someone will be kind enough to point out
where i did a mistake. Sorry for the long post btw...

==================================
homer (10.0.0.1) SCM
flanders (10.0.0.2) NON-SCM

/usr/www is the directory that should be replicated among the servers.

1) Installed all the binaries on homer and flanders

2) vice-setup on homer: 

[root_at_homer /]# vice-setup
Welcome to the Coda Server Setup script!
Do you want the file /etc/coda/server.conf created? [yes] yes
What is the root directory for your coda server? [/vice]
Setting up /vice.
Directories under /vice are set up.
Is this the master server, aka the SCM machine? (y/n) y
Enter a random token for update authentication : ***
Enter a random token for auth2 authentication : ***
Enter a random token for volutil authentication : ***
serverid: 1
Initializing the VSGDB to contain the SCM as E0000100
/vice/db/VSGDB set up
Enter the name of the rootvolume (< 32 chars) : www
Enter the uid of this user: 505
Enter the username of this user: codaroot
Are you ready to set up RVM? [yes/no] yes
What is your log partition? /dev/rd/c0d0p7
What is your log size? (enter as e.g. '2M') 25M
What is your data partition (or file)? /dev/rd/c0d0p6
[22M, 44M, 90M, 130M, 200M, 315M]: 1G 
Proceed, and wipe out old data? [y/n] y
LOG file has been initialized!
Going to initialize data file to zero, could take awhile.
done.
RVM setup is done!
Where shall we store your file data [/vicepa]? /usr/www
Shall I set up a vicetab entry for /usr/www (y/n) y
Select the maximum number of files for the server.
[256K, 1M, 2M, 16M]:
2M

Server directory /usr/www is set up!
[...]

3) launched the various daemons:
   /etc/rc.d/init.d/auth2.init start
   /etc/rc.d/init.d/update.init start
   /etc/rc.d/init.d/codasrv.init start

and waited for the server to be ready (by checking in the log file):
[...]
18:11:33 VCheckVLDB:  could not open VLDB
18:11:33 VInitVolPackage: no VLDB! Please create a new one.
18:11:33 CheckVRDB: could not open VRDB
[...]
18:11:33 File Server started Fri Nov 16 18:11:33 2001

(i don't know why i get those errors, but the server seems to start anyway)

4) [root_at_homer /]# createvol_rep www E0000100 /usr/www

[...]
VLDB completed.
<echo www 7f000000       1 1000001 0 0 0 0 0 0 0 E0000100 >> /vice/db/VRList>
V_BindToServer: binding to host homer
VRDB completed.
Do you wish this volume to be Backed Up (y/n)? [n] n

5) vice-setup on flanders (the non-SCM server)
[...]
Is this the master server, aka the SCM machine? (y/n) n
Enter the hostname of the SCM machine : homer
Enter the update token that matches SCM homer: ***
[other info is totally identical to the SCM]

6) edited /vice/db/servers to look like:
homer           1
flanders        2

7) edited /vice/db/VSGDB to look like:
E0000100 homer
E0000102 flanders
E0000104 homer flanders

as stated in the user guide

8) started daemons on the non-scm (flanders) and waited for the server to be ready

9) 
[root_at_homer /]# createvol_rep www E0000104 /usr/www
Volume www already exists in /vice/db/VRList

changed the name, just to test:
[root_at_homer /]# createvol_rep realwww E0000104 /usr/www
...
[ many lines of output, always stating "success"]
...

10) now the manual states "mount the volume", and i really can't
understand what i have to do next! ( isn't mounting an operation that
should be performed by clients only??)
I tried cfs mkmount /usr/www

Obviously, at this point replication of the /usr/www dir among 
the 2 server does not work yet...
=============================================

Sorry again for the long post, but I just want to understand why it doesn't work, before
trying some other solution... (there aren't many i guess..)

Valerio
Received on 2001-11-16 13:15:43