close Warning:

Changes between Initial Version and Version 1 of CodaHOWTO/Using


Ignore:
Timestamp:
Feb 8, 2007, 1:35:37 PM (11 years ago)
Author:
jaharkes
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodaHOWTO/Using

    v1 v1  
     1[[TracNav(CodaHOWTO)]]
     2
     3= Exploring Coda's features =
     4
     5== Restarting a server == #ServerRestart
     6
     7On the server the command `volutil shutdown` will stop the server. If it is really toasted, you might need to kill the `codasrv` process.
     8
     9To restart the server issue the command `startserver`. This shell script invokes `codasrv` with the correct arguments. If it complains about a server already running do the following: first check with `ps auxww | grep codasrv` if this is the case. If not, remove the file `/vice/srv/pid` and reissue the `startserver` command.
     10
     11== Getting more volumes == #CreatingVolumes
     12
     13It 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 file system.
     14
     15To make a new volume:
     16
     17 1. make sure your `codasrv`, `updateclnt` and `updatesrv` daemons are running.
     18 2. type `createvol_rep `''volname servername''`[`''/partitionname''`]`. Typically you determine your own volume name, and the partition name will default to `/vicepa` if it is not specified.
     19 3. mount the volume using `cfs makemount `''path volumename''. This creates the mount point, and mounts the volume.
     20
     21To explore volumes you can use other `cfs` commands, such as `cfs whereis `''path'' and `cfs listvolume `''path'' . To see the FID of a file type `cfs getfid `''path''.
     22
     23== Adding a user == #AddingUsers
     24
     25As 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.
     26
     27 1. Run `pdbtool` 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.
     28 2. Add the user and her user id with the ''nui'' command.
     29 3. Add the user to any groups you want.
     30 4. Give the new user a password by running `au nu` from either a client or a server.
     31
     32The user should now be able to login to Coda just like the first user set up at installation time.
     33
     34== Exploring ACL's == #ACLs
     35
     36You can set and list Access Control Lists on directories using `cfs setacl `''dir user rights''` [`''user rights''`...]`. To show the ACLs type `cfs listacl `''directory''.
     37
     38== Monitoring Coda == #StatusMonitoring
     39
     40Use `codacon` to see many RPC's and a few other actions taken by the client. The files in `/usr/coda/etc/` or `/var/log/coda/` also contain interesting information.
     41
     42To see how a server is doing use `cmon` or check the logs in `/vice/srv/`.
     43
     44== Using Coda disconnected and reintegrating == #DisconnectedMode
     45
     46First 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.
     47
     48 1. change directory into this volume. Get tokens using `clog`. Do `ls -l` on the directory where you want to start work while disconnected.
     49 2. type `cfs disconnect` or disconnect your network. After 30 seconds you can see that `codacon` (which you should always run) displays that your server is not reachable anymore.
     50 3. do some work disconnected, create some files, edit them etc.
     51 4. type `cfs reconnect`. Venus will discover that the net is up, but you can speed that up by typing `cfs checkservers`. Monitoring `codacon`, you will see that your changes are being reintegrated.
     52
     53To start Coda while disconnected, you may need the ip addresses and host names of your servers in /etc/hosts .
     54
     55== Repairing conflicts == #ConflictRepair
     56
     57Files 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 represented as a dangling symbolic link with a contents that looks like ''@00000000.0000000000.00000000''.
     58
     59How do we get rid of this conflict?
     60
     61 1. type `cfs beginrepair `''X''. This changes ''X'' from a symlink into a directory. By doing `ls `''X'' you will see either local global or server1 server2 server3 . In the first case we have a local-global conflict and in the second case a server-server conflict.
     62 2. If the objects in the directory ''X'' are files, you have a file conflict, they can also be directories, in which case you can find the content underneath.
     63 3. 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.
     64 4. `cfs endrepair `''X'' closes up the repair session.
     65 5. All local global conflicts are repaired with `repair`. Type `repair` and follow its cryptic instructions.
     66 6. Server-server conflicts on files are fixed with either `filerepair` or removed with `removeinc`. Server-server conflicts on directories are fixed with `repair`.
     67
     68== Exploring replication == #Replication
     69
     70First you will have to add a second server to your Coda cluster. Install the software and use `vice-setup` again. This time your server is not going to be the '''SCM'''. Proceed answering the questions until done.
     71
     72On the '''SCM''' add the following:
     73
     74 1. Your server needs a server number, to be added to the `/vice/db/servers` file ''ON THE SCM''
     75 1. Start `updatesrv` and `updateclnt` on the second server
     76 1. Start `codasrv` on the second server
     77 1. Make a new volume from the ''SCM'' using createvol_rep but this time specifying one or more servers `createvol_rep `''volumename server1''`[`''/partition''`] `''server2''`[`''/partition''`]`
     78 1. Mount the volume as above
     79
     80You 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 `volutil shutdown` or disconnect its network.
     81
     82Modifications made to coda files during the server outage will be resolved when the files are first accessed. You see message of the form Resolve path in the `codacon` output. By typing `cfs checkservers` you can see if the server is available again.