Dealing with conflicts

From Codawiki

I'm sure hoping someone populates this page since I've been struggling a bit with conflict issues. -Patrick 21:32, 5 May 2005 (CEST)

Identifying Conflicts

If you suspect a conflict because, for example, you can't access a volume or an application is giving read or write errors, you can identify where the conflict(s) are by executing this command from a client:

find /coda/realmname -noleaf -lname '@*'

Client/Server Conflicts

Also called Local/Global conflicts. See the documentation:

Server/Server Conflicts

See the documentation:

As mentioned in one of the above mailing list links, you can simplify the resolution of server-server conflicts with a script like this:

for conf in `find . -noleaf -lname '@*'` ; do
    repair $conf /tmp/fix -owner 7768 -mode 755
done 

It seems that the above script only handles directory conflicts. You should probably solve file conflicts by hand. However, in my setup, any server-server conflicts are probably bogus (at least, I've not yet seen a real one) so I wrote the following script, which may be usefule to someone else. It assumes that you have two servers named server1 and server2 -Patrick 20:30, 8 Jul 2005 (CEST)

server1=server1
server2=server2
for conf in `find . -noleaf -lname '@*'` ; do
       cfs beginrepair $conf
       file=`echo $conf | sed 's/^.*\///'`
       sum1=`sha1sum $conf/$server1 | cut -d" " -f1`
       sum2=`sha1sum $conf/$server2 | cut -d" " -f1`
       if [ sum1 == sum2 ] ; then
              cp $conf/$server1 /tmp/$file
              cfs endrepair $conf
              echo beginrepair $conf > /tmp/fix
              echo replaceinc >> /tmp/fix
              echo /tmp/$file >> /tmp/fix
              echo y >> /tmp/fix
              echo endrepair >> /tmp/fix
              cat /tmp/fix | repair
              rm -f /tmp/$file
       fi
done

If you run into problems, see the Common error messages page.