Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 211238da6d926d1ca4390483bb29f586 > files > 8

coda-doc-5.2.0-4mdk.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>The Coda HOWTO: Exploring Coda's features</TITLE>
 <LINK HREF="coda-howto-5.html" REL=next>
 <LINK HREF="coda-howto-3.html" REL=previous>
 <LINK HREF="coda-howto.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="coda-howto-5.html">Next</A>
<A HREF="coda-howto-3.html">Previous</A>
<A HREF="coda-howto.html#toc4">Contents</A>
<HR>
<H2><A NAME="s4">4. Exploring Coda's features</A></H2>

<P>
<P>
<H2><A NAME="ss4.1">4.1 Restarting a server </A>
</H2>

<P>
<P>On the server the command <CODE>volutil shutdown</CODE> will stop the server.
If it is really toasted, you might need to kill the <EM>codasrv</EM>
process.
<P>To restart the server issue the command <CODE>startserver</CODE>.  This shell
script invokes <CODE>codasrv</CODE> with the correct arguments.  If it
complains about a server already running do the following: first check
with <CODE>ps auxww | grep codasrv</CODE> if this is the case.  If not,
remove the file <CODE>/vice/srv/pid</CODE> and reissue the
<CODE>startserver</CODE> command.
<P>
<H2><A NAME="ss4.2">4.2 Getting more volumes </A>
</H2>

<P>
<P>It is a good idea to create a few extra volumes on your server and
mount these in the coda directory tree.  In particular if you want to
explore reintegration, conflict resolution and replication servers we
recommend that you do that in new volumes and not in the volume
mounted on the root of the Coda filesystem.
<P>To make a new volume:
<OL>
<LI> make sure your codasrv, updatecln and updatesrv are running.</LI>
<LI> type <CODE>createvol_rep volname vsgaddr partitionname</CODE>.  Typically
you determine your own volume name, the VSG address can be found in
/vice/db/VSGDB and the partition name will be /vicepa. </LI>
<LI> mount the volume using <CODE>cfs makemount path volumename</CODE>.
This creates the mount point, and mounts the volume.</LI>
</OL>
<P>To <B>explore volumes</B> you can use other cfs commands, such as
<CODE>cfs whereis path</CODE> and <CODE>cfs listvolume path</CODE>.  To see the FID of 
a file type <CODE>cfs getfid path</CODE>. 
<P>
<H2><A NAME="ss4.3">4.3 Adding a user </A>
</H2>

<P>
<P>As of release 5.2 we have a tool to manage the user database.  It is
basic, but can handle things like hierarchical groups and is a major
improvement over the old tools. 
<P>
<OL>
<LI> Run <B>pdbtool</B> on the SCM.  Type help to see commands, and type the command
without arguments to get more help. There is also a manpage for
pdbtool which you may want consult.</LI>
<LI> Add the user and her user id with the nui command.</LI>
<LI> Add the user to any groups you.</LI>
<LI> Give the new user a password by using the <CODE>au nu</CODE> program
(from either a client or a server).    </LI>
</OL>
 
<P>The user should now be able to login to Coda just like the first user
set up at installation time.
<P><B>Note:</B> Conversion from a pre 5.2 version of the user databases is
done with the <CODE>pwdtopdbtool</CODE> tool.  This script takes no arguments
and converts old databases to new; it <EM>overwrites</EM> the new
databases!
<P>
<H2><A NAME="ss4.4">4.4 Exploring ACL's.  </A>
</H2>

<P>
<P>You can set and list Access Control Lists on directories using <CODE>cfs setacl dir user rights [user rights...]</CODE>.  To show the ACLs type
<CODE>cfs listacl directory</CODE>.
<P>
<H2><A NAME="ss4.5">4.5 Monitoring Coda </A>
</H2>

<P>
<P>Use <CODE>codacon</CODE> to see many RPC's and a few other actions taken by
the client.  The file <CODE>/usr/coda/etc/console</CODE> also has
interesting information. 
<P>To see how a server is doing use <CODE>cmon</CODE>, in the form <CODE>cmon
server:25</CODE>, 25 depicts the width of the column used by the server.
<P>
<H2><A NAME="ss4.6">4.6 Using Coda disconnected and reintegrating.</A>
</H2>

<P>
<P>First create a new volume, not equal to your root volume, to explore
this.  Should you get conflicts in your root volume then they will be
hard to repair.  See below how to add a volume.
<P>
<OL>
<LI> change directory into this volume.  Do "ls -l" on the directory 
where you want to start work while disconnected.  Get tokens using
<CODE>clog</CODE>. 
</LI>
<LI> type <CODE>cfs disconnect</CODE> or disconnect your network.  After 30
seconds you can see that <EM>codacon</EM> (which you should always run)
displays that your server is not reachable anymore.
</LI>
<LI> do some work disconnected, create some files, edit them etc.
</LI>
<LI> type <CODE>cfs reconnect</CODE>. Venus will discover that the net is
up, but you can speed that up by typing <CODE>cfs checkservers</CODE>.
Monitoring codacon, you will see that your changes are being
re-integrated.</LI>
</OL>
<P>To start Coda while disconnected, you need the ip addresses and
hostnames of your servers in <CODE>/etc/hosts</CODE>.
<P>
<P>
<P>
<H2><A NAME="ss4.7">4.7 Repairing conflicts </A>
</H2>

<P>
<P>Files and directories can get into conflict due to disconnections of
clients or servers from the net, as well as through overlapping
open/write/close sequences on two clients.  A object that is in
conflict is representd as a dangling symbolic link and
<CODE>X-&gt;@vol.vnode.unique</CODE> is the file the symlinks points to.
<P>How do we get rid of this conflict? 
<P>
<OL>
<LI> type <CODE>cfs beginrepair X</CODE>.  This changes X from a symlink
into a directory.  By doing <CODE>ls X</CODE> you will see either <CODE>local
global</CODE> or <CODE>server1 server2 server3</CODE>.  In the first case we have a
local global conflict and in the second case a server server conflict.

</LI>
<LI> If the objects in the directory <CODE>X</CODE> are files, you have a
file conflict, they can also be directories, in which case you can
find the content underneath.
</LI>
<LI> If you are nervous, this is a good moment to make copy of your
files. They can be found under the directory X while the repair
session is in progress.  
</LI>
<LI> <CODE>cfs endrepair X</CODE> closes up the repair
session.
</LI>
<LI> All local global conflicts are repaired with <CODE>repair</CODE>.  Type
<CODE>repair</CODE> and follow its cryptic instructions.
</LI>
<LI> Server-server conflicts on files are fixed with either
<CODE>filerepair</CODE> or with <CODE>removeinc</CODE>.  Server-server conflicts on
directories are fixed with <CODE>repair</CODE>.
</LI>
</OL>
<P>
<P>
<H2><A NAME="ss4.8">4.8 Exploring replication </A>
</H2>

<P>
<P>First you will have to add a second server to your Coda cluster.
Install the software and use <CODE>vice-setup</CODE> again.  This time your
server is <EM>not</EM> going to be the SCM.  Proceed answering the
questions until done. 
<P>On the SCM add the following:
<P>
<OL>
<LI> Your server needs a server number, to be added to the
<CODE>/vice/db/servers</CODE> file <B>ON THE SCM</B>.</LI>
<LI> Make two new entries in the <CODE>/vice/db/VSGDB</CODE> file. One
for your new server by itself, one of the form: <CODE>E0000104
scm-server second-server</CODE>. </LI>
<LI> Start updatesrv and updateclnt on the second server.</LI>
<LI> Start codasrv on the second server</LI>
<LI> Make a new volume <B>from the SCM</B> using <CODE>createvol_rep</CODE>
giving the address of the volume as <CODE>E0000104</CODE>. </LI>
<LI> Mount the volume as above.</LI>
</OL>

You can now use this volume and your files will automatically be
stored on multiple servers.  To temporarily disable a server, and see
that things continue to function normally, either shut the server down 
with <CODE>volutil shutdown</CODE> or disconnect its network.  You can also
isolate the server using our network filters with <CODE>filcon isolate
-s server-name</CODE>.  Using <CODE>filcon clear server-name</CODE> clears the
filter.
<P>Modifications made to coda files during the server outage will be
resolved when the files are first accessed.  You see message of the
form <CODE>Resolve path</CODE> in the codacon output. By typing <CODE>cfs
checkservers</CODE> you can see if the server is available again.
<P>
<P>
<HR>
<A HREF="coda-howto-5.html">Next</A>
<A HREF="coda-howto-3.html">Previous</A>
<A HREF="coda-howto.html#toc4">Contents</A>
</BODY>
</HTML>