1REPAIR(1)                                                            REPAIR(1)
2
3
4

NAME

6       repair - Repair conflicts in the Coda Distributed File    System
7

SYNOPSIS

9       repair -d
10
11
12       repair -allowclear
13
14
15       repair object_in_conflict fixfile [ repair_options ]
16
17

DESCRIPTION

19       The  Coda  repair tool allows you to manually resolve two kinds of con‐
20       flicts resulted from partitioned updates. Server-server  conflicts  are
21       conflicting  mutations performed on partitioned servers that can not be
22       automatically resolved. Local-global conflicts are caused by  mutations
23       performed on a disconnected client that are in conflict with the global
24       server state.
25
26       To use the repair  tool  interactively,  type  repair  at  the  command
27       prompt.
28
29       Server-Server  conflicts  can be repaired from the command line without
30       entering interactive mode. This is useful if you need  to  repair  many
31       conflicts  within  a volume at a time and wish to write a shell script.
32       Please see the EXAMPLES  section  for  examples  on  invoking  complete
33       repair sequences from the command line.
34
35       A description of the repair commands follows:
36
37       beginrepair object
38              verifies  that  object  is indeed in conflict. It will print out
39              messages to indicate whether the current repair session  is  for
40              server-server conflict or local-global conflict.
41
42              For  a server-server repair session, this command locks the cor‐
43              responding volume and and mounts its individual  replicas  read-
44              only.  It  will  inform  the  users to only use the comparedirs,
45              dorepair and removeinc commands to repair the conflict.
46
47              For a local-global repair session, both local and global  repli‐
48              cas  of  object  are  visible  at  object/local  (read-only) and
49              object/global (mutable and serving as the workspace for  storing
50              the  repair  result for object). You need to iterate through the
51              current sessions local-mutations-list containing all  the  local
52              updates  to object and its descendants. Each operation in local-
53              mutations-list must be accounted for  and  Venus  maintains  the
54              current-mutation  being  iterated. Use the checklocal command to
55              find out the  conflict  between  the  current-mutation  and  the
56              server  state. Note that not all local mutations are necessarily
57              in conflict, and you can use the listlocal command  to  see  all
58              the  operations  in  local-mutations-list.  You  can advance the
59              iteration to the next operation using either  the  preservelocal
60              or  the  discardlocal command with the former replaying the cur‐
61              rent-mutation operation on  the  relevant  global  replicas.  To
62              speed  up  the  iteration,  the preservealllocal command repeats
63              preservelocal until the local-mutations-list is exhausted or the
64              first  replay  failure.  Similarly,  the discardalllocal command
65              repeats discardlocal until exhausting the  local-mutations-list.
66              You  can  use  external  tools  such  as emacs(1) to make direct
67              updates on needed replicas under  object/global.  Use  the  quit
68              command to either commit or abort the session.
69
70       quit   If  the  current  session is repairing a server-server conflict,
71              this command releases all the volume-level locks and causes  the
72              repair  tool  to  return to the shell. If the current session is
73              repairing a local-global conflict, this command asks you whether
74              to  commit  or  abort the repair session. If you answer yes, the
75              mutations performed on the relevant global replicas will be com‐
76              mitted  to  the  servers.   Otherwise, the repair result will be
77              aborted as if this repair session has never happened.
78
79       help   Prints out a help message.
80
81       Use the following commands to repair a server-server conflict:
82
83       comparedirs object fixfile [ -acl user rwlidka ] [ -mode  newmode  ]  [
84       -owner username ]
85              Compares  the  mounted read-only replicas of a directory in con‐
86              flict and prints the repair commands  in  fixfile  to  make  the
87              replicas  identical.  To  print  out the repair commands on your
88              terminal give stdout as the pathname for  fixfile.  Compensating
89              actions  for Name/Name conflicts and Update/Update conflicts are
90              not given. The user is  only  told  about  their  existence  and
91              required  to  edit the fixfile manually. You should have already
92              done a beginrepair on object and  this  command  works  only  if
93              object is a directory.
94
95       dorepair object fixfile
96              Does  the  actual repair of an object.  If the  repair succeeds,
97              each accessible replica will be marked consistent. You  will  be
98              prompted  for  the  arguments  if they are missing, and  will be
99              asked  to confirm the repair.  You should have  already  done  a
100              beginrepair  on  this object (or on on some other object in this
101              volume.). If object is a file or  symbolic  link,  fixfile  must
102              provide  its  new   contents.  If object is a directory, fixfile
103              must provide a sequence of directory repair  commands  for  each
104              replica. The format of fixfile for directories is as follows:
105
106              replica <servername> <id of replica1>
107                  <repair commands for replica1>
108              replica <servername> <id of replica2>
109                  <repair commands for  replica2>
110              and so on
111
112              Repair  commands are given one per line.  Blank lines are ok. id
113              of replica1, id of replica2, etc.  are   numbers  that  identify
114              each  replica.   These are the same as the volume  ids  of read-
115              write volumes corresponding to a replicated volume.  The  volume
116              ids  can  be obtained by doing an ls on the inconsistent object,
117              after the beginrepair  command  has  succeeded.   The  directory
118              repair commands are:
119
120              createf <filename> <fid.0> <fid.1> <fid.2>
121              creates <symlinkname> <fid.0> <fid.1> <fid.2>
122              createl <linkname> <fid.0> <fid.1> <fid.2>
123              created <dirname> <fid.0> <fid.1> <fid.2>
124              removefsl  <filename or symlinkname or linkname>
125              removed  <dirname>
126              mv <srcname> <tgtname>
127                  <src <fid.0> <fid.1> <fid.2>>
128                  <target <fid.1> <fid.2>>
129              setacl  <username> [rwlikda]
130              delacl  <username>
131              setmode <newmode>
132              setowner <new owner name>
133              setmtime <new modified time>
134
135              Note  that  for the setacl command, the short form access rights
136              of all and none can also be used.
137
138       removeinc object
139              Removes the inconsistent object if it  is  file  or  a  symbolic
140              link.  If  the object is a directory, all the descendants of the
141              object will be removed in all the accessible  replicas  and  the
142              directory  itself  will  be  removed as long as its replicas are
143              identical. If the owner or the ACL of the directory replicas are
144              different, you have to repair the conflict first.
145
146       clearinc object
147              Compares  the  mounted read only replicas of a directory in con‐
148              flict and if the replicas are identical it clears the  inconsis‐
149              tency  flag  of the replicas. Otherwise it will inform you about
150              the inequality of the replicas. You should run  the  comparedirs
151              command  to  find out the cause of conflict. This command should
152              be used only for  directories.  Files  and  symbolic  links  are
153              cleared of their inconsistency with the dorepair command.
154
155       The  following  commands  are used only for repairing local-global con‐
156       flicts:
157
158       checklocal
159              Checks to see if the current-mutation being iterated by the cur‐
160              rent  local-global repair session is in conflict with the server
161              state. It displays the operator and operand (s) of the  current-
162              mutation  operation and indicates whether it is in conflict with
163              the relevant server replicas. If it is in conflict, a brief rea‐
164              son  of  the  conflict is given. Note that this command does not
165              advance the iteration of the local-mutations-list.
166
167       discardlocal
168              Simply advances the iteration of the local-mutations-list of the
169              current  local-global  repair session to the next operation. Use
170              this command when the user does not  want  the  current-mutation
171              operation to have any effect on the repair result.
172
173       preservelocal
174              Tries to replay the current-mutation of the current local-global
175              repair session on the relevant global replicas.  In other words,
176              it  will  try  to preserve the effect of the current mutation in
177              the repair result.  If the replay  succeeds,  the  iteration  of
178              local-mutations-list will be advanced to the next operation. The
179              effect of the replay is visible only on this client and  not  on
180              the server until the repair result is successfully committed. If
181              the replay fails, information about the reason  of  the  failure
182              will be displayed.
183
184       discardalllocal
185              Repeatedly  performs  the  discardlocal command until the local-
186              mutations-list is exhausted. Its effect is to finish the  itera‐
187              tion  and  discard  the effect of all the remaining mutations on
188              the repair result.
189
190       preservealllocal
191              Repeatedly performs the preservelocal command  until  the  first
192              failure  or  the iteration of local-mutations-list is exhausted.
193              This command is used if the user wants to preserve the effect of
194              all the remaining mutation operations in the repair result.
195
196       listlocal
197              Prints  out  all the mutation operations in the local-mutations-
198              list of the current local-global repair session.
199
200       The following commands existed in old versions but are no  longer  sup‐
201       ported:
202
203       showreplicas object
204              Shows  the  names  of the individual replicas of object, and the
205              pathnames by which these replicas may be examined  read-only.  A
206              beginrepair  must  have  been done earlier on this object (or on
207              another object in the same volume).
208
209       unlockvolume pathname
210              Tells Venus to unlock the specified   volume   in  repair.    No
211              check   is  done  to  see  if  you locked the volume during this
212              repair session.  The primary use of this command  is  to  unlock
213              volumes  that were locked during a previous, aborted, invocation
214              of the repair tool.  The command will fail  if  Venus  discovers
215              that you do not hold the repair lock on the server.   This could
216              happen, for example, if your aborted repair occurred on  another
217              workstation,  or  if  you  were  not repairing the volume in the
218              first place.
219

EXAMPLES

221       This will cause repair to examine the object "common", generate  a  fix
222       file  for  it  and in addition to the contents of the fix file, and set
223       the acl for hmpierce to rlidwka on the replica.
224
225       repair common /tmp/fix -acl hmpierce all
226
227       The same repair would look like this in interactive mode:
228
229       repair> beginrepair common
230       repair> comparedirs common /tmp/fix -acl hmpierce all
231       repair> dorepair common /tmp/fix
232       repair> endrepair
233       repair> quit
234

AUTHORS

236       · M. Satyanarayanan, 1989, Created
237
238       · Puneet Kumar, 1991, Substantially revised
239
240       · Joshua Raiff, 1993, Created man page
241
242       · Qi Lu, 1995, Added local-global repair commands and revised man page
243
244       · Henry M. Pierce, 1998, updated for command line options
245
246
247
248Coda Distributed File System     25 April 2005                       REPAIR(1)
Impressum