Blame


1 1a8f27c3 2004-05-14 devnull .TH VENTIAUX 8
2 1a8f27c3 2004-05-14 devnull .SH NAME
3 1a8f27c3 2004-05-14 devnull buildindex,
4 1a8f27c3 2004-05-14 devnull checkarenas,
5 1a8f27c3 2004-05-14 devnull checkindex,
6 1a8f27c3 2004-05-14 devnull conf,
7 1a8f27c3 2004-05-14 devnull copy,
8 1a8f27c3 2004-05-14 devnull fmtarenas,
9 1a8f27c3 2004-05-14 devnull fmtindex,
10 1a8f27c3 2004-05-14 devnull fmtisect,
11 1a8f27c3 2004-05-14 devnull rdarena,
12 1a8f27c3 2004-05-14 devnull rdarenablocks,
13 1a8f27c3 2004-05-14 devnull read,
14 1a8f27c3 2004-05-14 devnull wrarenablocks,
15 1a8f27c3 2004-05-14 devnull write \- Venti maintenance and debugging commands
16 1a8f27c3 2004-05-14 devnull .SH SYNOPSIS
17 1a8f27c3 2004-05-14 devnull .B venti/buildindex
18 1a8f27c3 2004-05-14 devnull [
19 1a8f27c3 2004-05-14 devnull .B -B
20 1a8f27c3 2004-05-14 devnull .I blockcachesize
21 1a8f27c3 2004-05-14 devnull ]
22 1a8f27c3 2004-05-14 devnull [
23 1a8f27c3 2004-05-14 devnull .B -Z
24 1a8f27c3 2004-05-14 devnull ]
25 1a8f27c3 2004-05-14 devnull .I venti.config
26 1a8f27c3 2004-05-14 devnull .I tmp
27 1a8f27c3 2004-05-14 devnull .PP
28 1a8f27c3 2004-05-14 devnull .B venti/checkarenas
29 1a8f27c3 2004-05-14 devnull [
30 1a8f27c3 2004-05-14 devnull .B -afv
31 1a8f27c3 2004-05-14 devnull ]
32 1a8f27c3 2004-05-14 devnull .I file
33 1a8f27c3 2004-05-14 devnull .PP
34 1a8f27c3 2004-05-14 devnull .B venti/checkindex
35 1a8f27c3 2004-05-14 devnull [
36 1a8f27c3 2004-05-14 devnull .B -f
37 1a8f27c3 2004-05-14 devnull ]
38 1a8f27c3 2004-05-14 devnull [
39 1a8f27c3 2004-05-14 devnull .B -B
40 1a8f27c3 2004-05-14 devnull .I blockcachesize
41 1a8f27c3 2004-05-14 devnull ]
42 1a8f27c3 2004-05-14 devnull .I venti.config
43 1a8f27c3 2004-05-14 devnull .I tmp
44 1a8f27c3 2004-05-14 devnull .PP
45 1a8f27c3 2004-05-14 devnull .B venti/conf
46 1a8f27c3 2004-05-14 devnull [
47 1a8f27c3 2004-05-14 devnull .B -w
48 1a8f27c3 2004-05-14 devnull ]
49 1a8f27c3 2004-05-14 devnull .I partition
50 1a8f27c3 2004-05-14 devnull [
51 1a8f27c3 2004-05-14 devnull .I configfile
52 1a8f27c3 2004-05-14 devnull ]
53 1a8f27c3 2004-05-14 devnull .PP
54 1a8f27c3 2004-05-14 devnull .B venti/copy
55 1a8f27c3 2004-05-14 devnull [
56 1a8f27c3 2004-05-14 devnull .B -f
57 1a8f27c3 2004-05-14 devnull ]
58 1a8f27c3 2004-05-14 devnull .I src
59 1a8f27c3 2004-05-14 devnull .I dst
60 1a8f27c3 2004-05-14 devnull .I score
61 1a8f27c3 2004-05-14 devnull [
62 1a8f27c3 2004-05-14 devnull .I type
63 1a8f27c3 2004-05-14 devnull ]
64 1a8f27c3 2004-05-14 devnull .PP
65 1a8f27c3 2004-05-14 devnull .B venti/fmtarenas
66 1a8f27c3 2004-05-14 devnull [
67 1a8f27c3 2004-05-14 devnull .B -Z
68 1a8f27c3 2004-05-14 devnull ]
69 1a8f27c3 2004-05-14 devnull [
70 1a8f27c3 2004-05-14 devnull .B -a
71 1a8f27c3 2004-05-14 devnull .I arenasize
72 1a8f27c3 2004-05-14 devnull ]
73 1a8f27c3 2004-05-14 devnull [
74 1a8f27c3 2004-05-14 devnull .B -b
75 1a8f27c3 2004-05-14 devnull .I blocksize
76 1a8f27c3 2004-05-14 devnull ]
77 1a8f27c3 2004-05-14 devnull .I name
78 1a8f27c3 2004-05-14 devnull .I file
79 1a8f27c3 2004-05-14 devnull .PP
80 1a8f27c3 2004-05-14 devnull .B venti/fmtindex
81 1a8f27c3 2004-05-14 devnull [
82 1a8f27c3 2004-05-14 devnull .B -a
83 1a8f27c3 2004-05-14 devnull ]
84 1a8f27c3 2004-05-14 devnull .I venti.config
85 1a8f27c3 2004-05-14 devnull .PP
86 1a8f27c3 2004-05-14 devnull .B venti/fmtisect
87 1a8f27c3 2004-05-14 devnull [
88 1a8f27c3 2004-05-14 devnull .B -Z
89 1a8f27c3 2004-05-14 devnull ]
90 1a8f27c3 2004-05-14 devnull [
91 1a8f27c3 2004-05-14 devnull .B -b
92 1a8f27c3 2004-05-14 devnull .I blocksize
93 1a8f27c3 2004-05-14 devnull ]
94 1a8f27c3 2004-05-14 devnull .I name
95 1a8f27c3 2004-05-14 devnull .I file
96 1a8f27c3 2004-05-14 devnull .PP
97 1a8f27c3 2004-05-14 devnull .B venti/rdarena
98 1a8f27c3 2004-05-14 devnull [
99 1a8f27c3 2004-05-14 devnull .B -v
100 1a8f27c3 2004-05-14 devnull ]
101 1a8f27c3 2004-05-14 devnull .I arenapart
102 1a8f27c3 2004-05-14 devnull .I arenaname
103 1a8f27c3 2004-05-14 devnull .PP
104 1a8f27c3 2004-05-14 devnull .B venti/read
105 1a8f27c3 2004-05-14 devnull [
106 1a8f27c3 2004-05-14 devnull .B -h
107 1a8f27c3 2004-05-14 devnull .I host
108 1a8f27c3 2004-05-14 devnull ]
109 1a8f27c3 2004-05-14 devnull .I score
110 1a8f27c3 2004-05-14 devnull [
111 1a8f27c3 2004-05-14 devnull .I type
112 1a8f27c3 2004-05-14 devnull ]
113 1a8f27c3 2004-05-14 devnull .PP
114 1a8f27c3 2004-05-14 devnull .B venti/wrarena
115 1a8f27c3 2004-05-14 devnull [
116 1a8f27c3 2004-05-14 devnull .B -o
117 1a8f27c3 2004-05-14 devnull .I fileoffset
118 1a8f27c3 2004-05-14 devnull ]
119 1a8f27c3 2004-05-14 devnull [
120 1a8f27c3 2004-05-14 devnull .B -h
121 1a8f27c3 2004-05-14 devnull .I host
122 1a8f27c3 2004-05-14 devnull ]
123 1a8f27c3 2004-05-14 devnull .I arenafile
124 1a8f27c3 2004-05-14 devnull [
125 1a8f27c3 2004-05-14 devnull .I clumpoffset
126 1a8f27c3 2004-05-14 devnull ]
127 1a8f27c3 2004-05-14 devnull .PP
128 1a8f27c3 2004-05-14 devnull .B venti/write
129 1a8f27c3 2004-05-14 devnull [
130 1a8f27c3 2004-05-14 devnull .B -h
131 1a8f27c3 2004-05-14 devnull .I host
132 1a8f27c3 2004-05-14 devnull ]
133 1a8f27c3 2004-05-14 devnull [
134 1a8f27c3 2004-05-14 devnull .B -t
135 1a8f27c3 2004-05-14 devnull .I type
136 1a8f27c3 2004-05-14 devnull ]
137 1a8f27c3 2004-05-14 devnull [
138 1a8f27c3 2004-05-14 devnull .B -z
139 1a8f27c3 2004-05-14 devnull ]
140 1a8f27c3 2004-05-14 devnull .SH DESCRIPTION
141 1a8f27c3 2004-05-14 devnull These commands aid in the setup, maintenance, and debugging of
142 1a8f27c3 2004-05-14 devnull Venti servers.
143 1a8f27c3 2004-05-14 devnull See
144 1a8f27c3 2004-05-14 devnull .IR venti (8)
145 1a8f27c3 2004-05-14 devnull and
146 1a8f27c3 2004-05-14 devnull .IR venti.conf (6)
147 1a8f27c3 2004-05-14 devnull for an overview of the data structures stored by Venti.
148 1a8f27c3 2004-05-14 devnull .PP
149 1a8f27c3 2004-05-14 devnull Note that the units for the various sizes in the following
150 1a8f27c3 2004-05-14 devnull commands can be specified by appending
151 1a8f27c3 2004-05-14 devnull .LR k ,
152 1a8f27c3 2004-05-14 devnull .LR m ,
153 1a8f27c3 2004-05-14 devnull or
154 1a8f27c3 2004-05-14 devnull .LR g
155 1a8f27c3 2004-05-14 devnull to indicate kilobytes, megabytes, or gigabytes respectively.
156 1a8f27c3 2004-05-14 devnull .PP
157 1a8f27c3 2004-05-14 devnull .I Buildindex
158 1a8f27c3 2004-05-14 devnull populates the index for the Venti system described in
159 1a8f27c3 2004-05-14 devnull .IR venti.config .
160 1a8f27c3 2004-05-14 devnull The index must have previously been formatted using
161 1a8f27c3 2004-05-14 devnull .IR fmtindex .
162 1a8f27c3 2004-05-14 devnull This command is typically used to build a new index for a Venti
163 1a8f27c3 2004-05-14 devnull system when the old index becomes too small, or to rebuild
164 1a8f27c3 2004-05-14 devnull an index after media failure.
165 1a8f27c3 2004-05-14 devnull Small errors in an index can usually be fixed with
166 1a8f27c3 2004-05-14 devnull .IR checkindex .
167 1a8f27c3 2004-05-14 devnull .PP
168 1a8f27c3 2004-05-14 devnull The
169 1a8f27c3 2004-05-14 devnull .I tmp
170 1a8f27c3 2004-05-14 devnull file, usually a disk partition, must be large enough to store a copy of the index.
171 1a8f27c3 2004-05-14 devnull This temporary space is used to perform a merge sort of index entries
172 1a8f27c3 2004-05-14 devnull generated by reading the arenas.
173 1a8f27c3 2004-05-14 devnull .PP
174 1a8f27c3 2004-05-14 devnull Options to
175 1a8f27c3 2004-05-14 devnull .I buildindex
176 1a8f27c3 2004-05-14 devnull are:
177 1a8f27c3 2004-05-14 devnull .TP
178 1a8f27c3 2004-05-14 devnull .BI -B " blockcachesize
179 1a8f27c3 2004-05-14 devnull The amount of memory, in bytes, to use for caching raw disk accesses while running
180 1a8f27c3 2004-05-14 devnull .IR buildindex .
181 1a8f27c3 2004-05-14 devnull (This is not a property of the created index.)
182 1a8f27c3 2004-05-14 devnull The default is 8k.
183 1a8f27c3 2004-05-14 devnull .TP
184 1a8f27c3 2004-05-14 devnull .B -Z
185 1a8f27c3 2004-05-14 devnull Do not zero the index.
186 1a8f27c3 2004-05-14 devnull This option should only be used when it is known that the index was already zeroed.
187 1a8f27c3 2004-05-14 devnull .PD
188 1a8f27c3 2004-05-14 devnull .PP
189 1a8f27c3 2004-05-14 devnull .I Checkarenas
190 1a8f27c3 2004-05-14 devnull examines the Venti arenas contained in the given
191 1a8f27c3 2004-05-14 devnull .IR file .
192 1a8f27c3 2004-05-14 devnull The program detects various error conditions, and optionally attempts
193 1a8f27c3 2004-05-14 devnull to fix any errors that are found.
194 1a8f27c3 2004-05-14 devnull .PP
195 1a8f27c3 2004-05-14 devnull Options to
196 1a8f27c3 2004-05-14 devnull .I checkarenas
197 1a8f27c3 2004-05-14 devnull are:
198 1a8f27c3 2004-05-14 devnull .TP
199 1a8f27c3 2004-05-14 devnull .B -a
200 1a8f27c3 2004-05-14 devnull For each arena, scan the entire data section.
201 1a8f27c3 2004-05-14 devnull If this option is omitted, only the end section of
202 1a8f27c3 2004-05-14 devnull the arena is examined.
203 1a8f27c3 2004-05-14 devnull .TP
204 1a8f27c3 2004-05-14 devnull .B -f
205 1a8f27c3 2004-05-14 devnull Attempt to fix any errors that are found.
206 1a8f27c3 2004-05-14 devnull .TP
207 1a8f27c3 2004-05-14 devnull .B -v
208 1a8f27c3 2004-05-14 devnull Increase the verbosity of output.
209 1a8f27c3 2004-05-14 devnull .PD
210 1a8f27c3 2004-05-14 devnull .PP
211 1a8f27c3 2004-05-14 devnull .I Checkindex
212 1a8f27c3 2004-05-14 devnull examines the Venti index described in
213 1a8f27c3 2004-05-14 devnull .IR venti.config .
214 1a8f27c3 2004-05-14 devnull The program detects various error conditions including:
215 1a8f27c3 2004-05-14 devnull blocks that are not indexed, index entries for blocks that do not exist,
216 1a8f27c3 2004-05-14 devnull and duplicate index entries.
217 1a8f27c3 2004-05-14 devnull If requested, an attempt can be made to fix errors that are found.
218 1a8f27c3 2004-05-14 devnull .PP
219 1a8f27c3 2004-05-14 devnull The
220 1a8f27c3 2004-05-14 devnull .I tmp
221 1a8f27c3 2004-05-14 devnull file, usually a disk partition, must be large enough to store a copy of the index.
222 1a8f27c3 2004-05-14 devnull This temporary space is used to perform a merge sort of index entries
223 1a8f27c3 2004-05-14 devnull generated by reading the arenas.
224 1a8f27c3 2004-05-14 devnull .PP
225 1a8f27c3 2004-05-14 devnull Options to
226 1a8f27c3 2004-05-14 devnull .I checkindex
227 1a8f27c3 2004-05-14 devnull are:
228 1a8f27c3 2004-05-14 devnull .TP
229 1a8f27c3 2004-05-14 devnull .BI -B " blockcachesize
230 1a8f27c3 2004-05-14 devnull The amount of memory, in bytes, to use for caching raw disk accesses while running
231 1a8f27c3 2004-05-14 devnull .IR checkindex .
232 1a8f27c3 2004-05-14 devnull The default is 8k.
233 1a8f27c3 2004-05-14 devnull .TP
234 1a8f27c3 2004-05-14 devnull .B -f
235 1a8f27c3 2004-05-14 devnull Attempt to fix any errors that are found.
236 1a8f27c3 2004-05-14 devnull .PD
237 1a8f27c3 2004-05-14 devnull .PP
238 1a8f27c3 2004-05-14 devnull .I Fmtarenas
239 1a8f27c3 2004-05-14 devnull formats the given
240 1a8f27c3 2004-05-14 devnull .IR file ,
241 1a8f27c3 2004-05-14 devnull typically a disk partition, into a number of
242 1a8f27c3 2004-05-14 devnull Venti
243 1a8f27c3 2004-05-14 devnull arenas.
244 1a8f27c3 2004-05-14 devnull The arenas are given names of the form
245 1a8f27c3 2004-05-14 devnull .IR name%d ,
246 1a8f27c3 2004-05-14 devnull where
247 1a8f27c3 2004-05-14 devnull .I %d
248 1a8f27c3 2004-05-14 devnull is replaced with a sequential number starting at 0.
249 1a8f27c3 2004-05-14 devnull .PP
250 1a8f27c3 2004-05-14 devnull Options to
251 1a8f27c3 2004-05-14 devnull .I fmtarenas
252 1a8f27c3 2004-05-14 devnull are:
253 1a8f27c3 2004-05-14 devnull .TP
254 1a8f27c3 2004-05-14 devnull .BI -a " arenasize
255 1a8f27c3 2004-05-14 devnull The arenas are of
256 1a8f27c3 2004-05-14 devnull .I arenasize
257 1a8f27c3 2004-05-14 devnull bytes. The default is 512 megabytes, which was selected to provide a balance
258 1a8f27c3 2004-05-14 devnull between the number of arenas and the ability to copy an arena to external
259 1a8f27c3 2004-05-14 devnull media such as recordable CDs and tapes.
260 1a8f27c3 2004-05-14 devnull .TP
261 1a8f27c3 2004-05-14 devnull .BI -b " blocksize
262 1a8f27c3 2004-05-14 devnull The size, in bytes, for read and write operations to the file.
263 1a8f27c3 2004-05-14 devnull The size is recorded in the file, and is used by applications that access the arenas.
264 1a8f27c3 2004-05-14 devnull The default is 8k.
265 1a8f27c3 2004-05-14 devnull .TP
266 1a8f27c3 2004-05-14 devnull .B -Z
267 1a8f27c3 2004-05-14 devnull Do not zero the data sections of the arenas.
268 1a8f27c3 2004-05-14 devnull Using this option reduces the formatting time
269 1a8f27c3 2004-05-14 devnull but should only be used when it is known that the file was already zeroed.
270 1a8f27c3 2004-05-14 devnull .PD
271 1a8f27c3 2004-05-14 devnull .I Fmtindex
272 1a8f27c3 2004-05-14 devnull takes the
273 1a8f27c3 2004-05-14 devnull .IR venti.conf (6)
274 1a8f27c3 2004-05-14 devnull file
275 1a8f27c3 2004-05-14 devnull .I venti.config
276 1a8f27c3 2004-05-14 devnull and initializes the index sections to form a usable index structure.
277 1a8f27c3 2004-05-14 devnull The arena files and index sections must have previously been formatted
278 1a8f27c3 2004-05-14 devnull using
279 1a8f27c3 2004-05-14 devnull .I fmtarenas
280 1a8f27c3 2004-05-14 devnull and
281 1a8f27c3 2004-05-14 devnull .I fmtisect
282 1a8f27c3 2004-05-14 devnull respectively.
283 1a8f27c3 2004-05-14 devnull .PP
284 1a8f27c3 2004-05-14 devnull The function of a Venti index is to map a SHA1 fingerprint to a location
285 1a8f27c3 2004-05-14 devnull in the data section of one of the arenas. The index is composed of
286 1a8f27c3 2004-05-14 devnull blocks, each of which contains the mapping for a fixed range of possible
287 1a8f27c3 2004-05-14 devnull fingerprint values.
288 1a8f27c3 2004-05-14 devnull .I Fmtindex
289 1a8f27c3 2004-05-14 devnull determines the mapping between SHA1 values and the blocks
290 1a8f27c3 2004-05-14 devnull of the collection of index sections. Once this mapping has been determined,
291 1a8f27c3 2004-05-14 devnull it cannot be changed without rebuilding the index.
292 1a8f27c3 2004-05-14 devnull The basic assumption in the current implementation is that the index
293 1a8f27c3 2004-05-14 devnull structure is sufficiently empty that individual blocks of the index will rarely
294 1a8f27c3 2004-05-14 devnull overflow. The total size of the index should be about 2% to 10% of
295 1a8f27c3 2004-05-14 devnull the total size of the arenas, but the exact depends both the index block size
296 1a8f27c3 2004-05-14 devnull and the compressed size of block stored to Venti.
297 1a8f27c3 2004-05-14 devnull .PP
298 1a8f27c3 2004-05-14 devnull .I Fmtindex
299 1a8f27c3 2004-05-14 devnull also computes a mapping between a linear address space and
300 1a8f27c3 2004-05-14 devnull the data section of the collection of arenas. The
301 1a8f27c3 2004-05-14 devnull .B -a
302 1a8f27c3 2004-05-14 devnull option can be used to add additional arenas to an index.
303 1a8f27c3 2004-05-14 devnull To use this feature,
304 1a8f27c3 2004-05-14 devnull add the new arenas to
305 1a8f27c3 2004-05-14 devnull .I venti.config
306 1a8f27c3 2004-05-14 devnull after the existing arenas and then run
307 1a8f27c3 2004-05-14 devnull .I fmtindex
308 1a8f27c3 2004-05-14 devnull .BR -a .
309 1a8f27c3 2004-05-14 devnull .PP
310 1a8f27c3 2004-05-14 devnull A copy of the above mappings is stored in the header for each of the index sections.
311 1a8f27c3 2004-05-14 devnull These copies enable
312 1a8f27c3 2004-05-14 devnull .I buildindex
313 1a8f27c3 2004-05-14 devnull to restore a single index section without rebuilding the entire index.
314 1a8f27c3 2004-05-14 devnull .PP
315 1a8f27c3 2004-05-14 devnull .I Fmtisect
316 1a8f27c3 2004-05-14 devnull formats the given
317 1a8f27c3 2004-05-14 devnull .IR file ,
318 1a8f27c3 2004-05-14 devnull typically a disk partition, as a Venti index section with the specified
319 1a8f27c3 2004-05-14 devnull .IR name .
320 1a8f27c3 2004-05-14 devnull One or more formatted index sections are combined into a Venti
321 1a8f27c3 2004-05-14 devnull index using
322 1a8f27c3 2004-05-14 devnull .IR fmtindex .
323 1a8f27c3 2004-05-14 devnull Each of the index sections within an index must have a unique name.
324 1a8f27c3 2004-05-14 devnull .PP
325 1a8f27c3 2004-05-14 devnull Options to
326 1a8f27c3 2004-05-14 devnull .I fmtisect
327 1a8f27c3 2004-05-14 devnull are:
328 1a8f27c3 2004-05-14 devnull .TP
329 1a8f27c3 2004-05-14 devnull .BI -b " blocksize
330 1a8f27c3 2004-05-14 devnull The size, in bytes, for read and write operations to the file.
331 1a8f27c3 2004-05-14 devnull All the index sections within a index must have the same block size.
332 1a8f27c3 2004-05-14 devnull The default is 8k.
333 1a8f27c3 2004-05-14 devnull .TP
334 1a8f27c3 2004-05-14 devnull .B -Z
335 1a8f27c3 2004-05-14 devnull Do not zero the index.
336 1a8f27c3 2004-05-14 devnull Using this option reduces the formatting time
337 1a8f27c3 2004-05-14 devnull but should only be used when it is known that the file was already zeroed.
338 1a8f27c3 2004-05-14 devnull .PD
339 1a8f27c3 2004-05-14 devnull .PP
340 1a8f27c3 2004-05-14 devnull .I Rdarena
341 1a8f27c3 2004-05-14 devnull extracts the named
342 1a8f27c3 2004-05-14 devnull .I arena
343 1a8f27c3 2004-05-14 devnull from the arena partition
344 1a8f27c3 2004-05-14 devnull .I arenapart
345 1a8f27c3 2004-05-14 devnull and writes this arena to standard output.
346 1a8f27c3 2004-05-14 devnull This command is typically used to back up an arena to external media.
347 1a8f27c3 2004-05-14 devnull The
348 1a8f27c3 2004-05-14 devnull .B -v
349 1a8f27c3 2004-05-14 devnull option generates more verbose output on standard error.
350 1a8f27c3 2004-05-14 devnull .PP
351 1a8f27c3 2004-05-14 devnull .I Wrarena
352 1a8f27c3 2004-05-14 devnull writes the blocks contained in the arena
353 1a8f27c3 2004-05-14 devnull .I arenafile
354 1a8f27c3 2004-05-14 devnull (typically, the output of
355 1a8f27c3 2004-05-14 devnull .IR rdarena )
356 1a8f27c3 2004-05-14 devnull to a Venti server.
357 1a8f27c3 2004-05-14 devnull It is typically used to reinitialize a Venti server from backups of the arenas.
358 1a8f27c3 2004-05-14 devnull For example,
359 1a8f27c3 2004-05-14 devnull .IP
360 1a8f27c3 2004-05-14 devnull .EX
361 1a8f27c3 2004-05-14 devnull venti/rdarena /dev/sdC0/arenas arena.0 >external.media
362 1a8f27c3 2004-05-14 devnull venti/wrarena -h venti2 external.media
363 1a8f27c3 2004-05-14 devnull .EE
364 1a8f27c3 2004-05-14 devnull .LP
365 1a8f27c3 2004-05-14 devnull writes the blocks contained in
366 1a8f27c3 2004-05-14 devnull .B arena.0
367 1a8f27c3 2004-05-14 devnull to the Venti server
368 1a8f27c3 2004-05-14 devnull .B venti2
369 1a8f27c3 2004-05-14 devnull (typically not the one using
370 1a8f27c3 2004-05-14 devnull .BR /dev/sdC0/arenas ).
371 1a8f27c3 2004-05-14 devnull .PP
372 1a8f27c3 2004-05-14 devnull The
373 1a8f27c3 2004-05-14 devnull .B -o
374 1a8f27c3 2004-05-14 devnull option specifies that the arena starts at byte
375 1a8f27c3 2004-05-14 devnull .I fileoffset
376 1a8f27c3 2004-05-14 devnull (default
377 1a8f27c3 2004-05-14 devnull .BR 0 )
378 1a8f27c3 2004-05-14 devnull in
379 1a8f27c3 2004-05-14 devnull .I arenafile .
380 1a8f27c3 2004-05-14 devnull This is useful for reading directly from
381 1a8f27c3 2004-05-14 devnull the Venti arena partition:
382 1a8f27c3 2004-05-14 devnull .IP
383 1a8f27c3 2004-05-14 devnull .EX
384 1a8f27c3 2004-05-14 devnull venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas
385 1a8f27c3 2004-05-14 devnull .EE
386 1a8f27c3 2004-05-14 devnull .LP
387 1a8f27c3 2004-05-14 devnull (In this example, 335872 is the offset shown in the Venti
388 1a8f27c3 2004-05-14 devnull server's index list (344064) minus one block (8192).
389 1a8f27c3 2004-05-14 devnull You will need to substitute your own arena offsets
390 1a8f27c3 2004-05-14 devnull and block size.)
391 1a8f27c3 2004-05-14 devnull .PP
392 1a8f27c3 2004-05-14 devnull Finally, the optional
393 1a8f27c3 2004-05-14 devnull .I offset
394 1a8f27c3 2004-05-14 devnull argument specifies that the writing should begin with the
395 1a8f27c3 2004-05-14 devnull clump starting at
396 1a8f27c3 2004-05-14 devnull .I offset
397 1a8f27c3 2004-05-14 devnull within the arena.
398 1a8f27c3 2004-05-14 devnull .I Wrarena
399 1a8f27c3 2004-05-14 devnull prints the offset it stopped at (because there were no more data blocks).
400 1a8f27c3 2004-05-14 devnull This could be used to incrementally back up a Venti server
401 1a8f27c3 2004-05-14 devnull to another Venti server:
402 1a8f27c3 2004-05-14 devnull .IP
403 1a8f27c3 2004-05-14 devnull .EX
404 1a8f27c3 2004-05-14 devnull last=`{cat last}
405 1a8f27c3 2004-05-14 devnull venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas $last >output
406 1a8f27c3 2004-05-14 devnull awk '/^end offset/ { print $3 }' offset >last
407 1a8f27c3 2004-05-14 devnull .EE
408 1a8f27c3 2004-05-14 devnull .LP
409 1a8f27c3 2004-05-14 devnull Of course, one would need to add wrapper code to keep track
410 1a8f27c3 2004-05-14 devnull of which arenas have been processed.
411 1a8f27c3 2004-05-14 devnull See
412 1a8f27c3 2004-05-14 devnull .B /sys/src/cmd/venti/backup.example
413 1a8f27c3 2004-05-14 devnull for a version that does this.
414 1a8f27c3 2004-05-14 devnull .PP
415 1a8f27c3 2004-05-14 devnull .I Read
416 1a8f27c3 2004-05-14 devnull and
417 1a8f27c3 2004-05-14 devnull .I write
418 1a8f27c3 2004-05-14 devnull read and write blocks from a running Venti server.
419 1a8f27c3 2004-05-14 devnull They are intended to ease debugging of the server.
420 1a8f27c3 2004-05-14 devnull The default
421 1a8f27c3 2004-05-14 devnull .I host
422 1a8f27c3 2004-05-14 devnull is the environment variable
423 1a8f27c3 2004-05-14 devnull .BR $venti ,
424 1a8f27c3 2004-05-14 devnull followed by the network metaname
425 1a8f27c3 2004-05-14 devnull .BR $venti .
426 1a8f27c3 2004-05-14 devnull The
427 1a8f27c3 2004-05-14 devnull .I type
428 1a8f27c3 2004-05-14 devnull is the decimal type of block to be read or written.
429 1a8f27c3 2004-05-14 devnull If no
430 1a8f27c3 2004-05-14 devnull .I type
431 1a8f27c3 2004-05-14 devnull is specified for
432 1a8f27c3 2004-05-14 devnull .I read ,
433 1a8f27c3 2004-05-14 devnull all types are tried, and a command-line is printed to
434 1a8f27c3 2004-05-14 devnull show the type that eventually worked.
435 1a8f27c3 2004-05-14 devnull If no
436 1a8f27c3 2004-05-14 devnull .I type
437 1a8f27c3 2004-05-14 devnull is specified for
438 1a8f27c3 2004-05-14 devnull .I write ,
439 1a8f27c3 2004-05-14 devnull .B VtDataType
440 1a8f27c3 2004-05-14 devnull (13)
441 1a8f27c3 2004-05-14 devnull is used.
442 1a8f27c3 2004-05-14 devnull .I Read
443 1a8f27c3 2004-05-14 devnull reads the block named by
444 1a8f27c3 2004-05-14 devnull .I score
445 1a8f27c3 2004-05-14 devnull (a SHA1 hash)
446 1a8f27c3 2004-05-14 devnull from the Venti server and writes it to standard output.
447 1a8f27c3 2004-05-14 devnull .I Write
448 1a8f27c3 2004-05-14 devnull reads a block from standard input and attempts to write
449 1a8f27c3 2004-05-14 devnull it to the Venti server.
450 1a8f27c3 2004-05-14 devnull If successful, it prints the score of the block on the server.
451 1a8f27c3 2004-05-14 devnull .PP
452 1a8f27c3 2004-05-14 devnull .I Copy
453 1a8f27c3 2004-05-14 devnull walks the entire tree of blocks rooted at
454 1a8f27c3 2004-05-14 devnull .I score ,
455 1a8f27c3 2004-05-14 devnull copying all the blocks visited during the walk from
456 1a8f27c3 2004-05-14 devnull the Venti server at network address
457 1a8f27c3 2004-05-14 devnull .I src
458 1a8f27c3 2004-05-14 devnull to the Venti server at network address
459 1a8f27c3 2004-05-14 devnull .I dst .
460 1a8f27c3 2004-05-14 devnull If
461 1a8f27c3 2004-05-14 devnull .I type
462 1a8f27c3 2004-05-14 devnull (a decimal block type for
463 1a8f27c3 2004-05-14 devnull .IR score )
464 1a8f27c3 2004-05-14 devnull is omitted, all types will be tried in sequence
465 1a8f27c3 2004-05-14 devnull until one is found that works.
466 1a8f27c3 2004-05-14 devnull The
467 1a8f27c3 2004-05-14 devnull .B -f
468 1a8f27c3 2004-05-14 devnull flag runs the copy in ``fast'' mode: if a block is already on
469 1a8f27c3 2004-05-14 devnull .IR dst ,
470 1a8f27c3 2004-05-14 devnull the walk does not descend below it, on the assumption that all its
471 1a8f27c3 2004-05-14 devnull children are also already on
472 1a8f27c3 2004-05-14 devnull .IR dst .
473 1a8f27c3 2004-05-14 devnull Without this flag, the copy often transfers many times more
474 1a8f27c3 2004-05-14 devnull data than necessary.
475 1a8f27c3 2004-05-14 devnull .PP
476 1a8f27c3 2004-05-14 devnull To make it easier to bootstrap servers, the configuration
477 1a8f27c3 2004-05-14 devnull file can be stored at the beginning of any Venti partitions using
478 1a8f27c3 2004-05-14 devnull .IR conf .
479 1a8f27c3 2004-05-14 devnull A partition so branded with a configuration file can
480 1a8f27c3 2004-05-14 devnull be used in place of a configuration file when invoking any
481 1a8f27c3 2004-05-14 devnull of the venti commands.
482 1a8f27c3 2004-05-14 devnull By default,
483 1a8f27c3 2004-05-14 devnull .I conf
484 1a8f27c3 2004-05-14 devnull prints the configuration stored in
485 1a8f27c3 2004-05-14 devnull .IR partition .
486 1a8f27c3 2004-05-14 devnull When invoked with the
487 1a8f27c3 2004-05-14 devnull .B -w
488 1a8f27c3 2004-05-14 devnull flag,
489 1a8f27c3 2004-05-14 devnull .I conf
490 1a8f27c3 2004-05-14 devnull reads a configuration file from
491 1a8f27c3 2004-05-14 devnull .I configfile
492 1a8f27c3 2004-05-14 devnull (or else standard input)
493 1a8f27c3 2004-05-14 devnull and stores it in
494 1a8f27c3 2004-05-14 devnull .IR partition .
495 1a8f27c3 2004-05-14 devnull .SH SOURCE
496 1a8f27c3 2004-05-14 devnull .B /sys/src/cmd/venti
497 1a8f27c3 2004-05-14 devnull .SH "SEE ALSO"
498 1a8f27c3 2004-05-14 devnull .IR venti (8),
499 1a8f27c3 2004-05-14 devnull .IR venti.conf (6)
500 1a8f27c3 2004-05-14 devnull .SH BUGS
501 1a8f27c3 2004-05-14 devnull .I Buildindex
502 1a8f27c3 2004-05-14 devnull should allow an individual index section to be rebuilt.
503 1a8f27c3 2004-05-14 devnull The merge sort could be performed in the space used to store the
504 1a8f27c3 2004-05-14 devnull index rather than requiring a temporary file.