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:
- http://www.coda.cs.cmu.edu/doc/html/manual/x367.html
- http://www.coda.cs.cmu.edu/doc/html/manual/x518.html#AEN570
- http://www.coda.cs.cmu.edu/doc/html/coda-howto-4.html#ss4.7
- http://www.infoscience.co.jp/technical/coda/doc/html/manual-19.html#ss19.10
Server/Server Conflicts
See the documentation:
- http://www.coda.cs.cmu.edu/doc/html/manual/x518.html#AEN529
- http://www.infoscience.co.jp/technical/coda/doc/html/manual-19.html#ss19.10
- http://www.coda.cs.cmu.edu/maillists/codalist/codalist-2003/5481.html
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.
