11 syncindex \- prepare and maintain a venti server
99 These commands aid in the setup, maintenance, and debugging of
103 for an overview of the venti system and
105 for an overview of the data structures used by the venti server.
107 Note that the units for the various sizes in the following
108 commands can be specified by appending
113 to indicate kilobytes, megabytes, or gigabytes respectively.
115 To prepare a server for its initial use, the arena partitions and
116 the index sections must be formatted individually, with
121 collection of index sections must be combined into a venti
128 typically a disk partition, into an arena partition.
129 The arenas in the partition are given names of the form
133 is replaced with a sequential number starting at 0.
142 bytes. The default is
144 which was selected to provide a balance
145 between the number of arenas and the ability to copy an arena to external
146 media such as recordable CDs and tapes.
149 The size, in bytes, for read and write operations to the file.
150 The size is recorded in the file, and is used by applications that access the arenas.
155 Create a `version 4' arena partition for backwards compatibility with old servers.
156 The default is version 5, used by the current venti server.
159 Do not zero the data sections of the arenas.
160 Using this option reduces the formatting time
161 but should only be used when it is known that the file was already zeroed.
162 (Version 4 only; version 5 sections are not and do not need to be zeroed.)
168 typically a disk partition, as a venti index section with the specified
170 Each of the index sections in a venti configuration must have a unique name.
177 The size of an index bucket, in bytes.
178 All the index sections within a index must have the same bucket size.
183 Create a `version 1' index section for backwards compatibility with old servers.
184 The default is version 2, used by the current venti server.
187 Do not zero the index.
188 Using this option reduces the formatting time
189 but should only be used when it is known that the file was already zeroed.
190 (Version 1 only; version 2 sections are not and do not need to be zeroed.)
203 .BI -n " nblock \fR| " -N " nhash
204 The number of blocks expected to be indexed by the filter
205 or the number of hash functions to use.
209 is given, it is used, along with the total size of the filter,
210 to compute an appropriate
214 The size of the Bloom filter. The default is the total size of the file.
217 is rounded down to a power of two.
222 argument in the commands above can be of the form
224 to specify a range of the file.
228 are specified in bytes but can have the usual
239 This notation eliminates the need to
240 partition raw disks on non-Plan 9 systems.
243 reads the configuration file
245 and initializes the index sections to form a usable index structure.
246 The arena files and index sections must have previously been formatted
253 The function of a venti index is to map a SHA1 fingerprint to a location
254 in the data section of one of the arenas. The index is composed of
255 blocks, each of which contains the mapping for a fixed range of possible
258 determines the mapping between SHA1 values and the blocks
259 of the collection of index sections. Once this mapping has been determined,
260 it cannot be changed without rebuilding the index.
261 The basic assumption in the current implementation is that the index
262 structure is sufficiently empty that individual blocks of the index will rarely
263 overflow. The total size of the index should be about 2% to 10% of
264 the total size of the arenas, but the exact percentage depends both on the
265 index block size and the compressed size of blocks stored.
266 See the discussion in
271 also computes a mapping between a linear address space and
272 the data section of the collection of arenas. The
274 option can be used to add additional arenas to an index.
276 add the new arenas to
278 after the existing arenas and then run
282 A copy of the above mappings is stored in the header for each of the index sections.
285 to restore a single index section without rebuilding the entire index.
287 To make it easier to bootstrap servers, the configuration
288 file can be stored in otherwise empty space
289 at the beginning of any venti partitions using
291 A partition so branded with a configuration file can
292 be used in place of a configuration file when invoking any
293 of the venti commands.
296 prints the configuration stored in
298 When invoked with the
302 reads a configuration file from
304 (or else standard input)
307 .SS Checking and Rebuilding
310 populates the index for the Venti system described in
312 The index must have previously been formatted using
314 This command is typically used to build a new index for a Venti
315 system when the old index becomes too small, or to rebuild
316 an index after media failure.
317 Small errors in an index can usually be fixed with
321 requires a large temporary workspace and
328 .TF "\fL-M\fI imemsize"
332 Reinitialise the Bloom filter, if any.
335 `Dumb' mode; run all three passes.
338 Only rebuild index section
340 may be repeated to rebuild multiple sections.
343 is special and just reads the arenas.
346 The amount of memory, in bytes, to use for caching raw disk accesses while running
348 (This is not a property of the created index.)
349 The usual suffices apply.
354 examines the Venti index described in
356 The program detects various error conditions including:
357 blocks that are not indexed, index entries for blocks that do not exist,
358 and duplicate index entries.
359 If requested, an attempt can be made to fix errors that are found.
363 file, usually a disk partition, must be large enough to store a copy of the index.
364 This temporary space is used to perform a merge sort of index entries
365 generated by reading the arenas.
371 .BI -B " blockcachesize
372 The amount of memory, in bytes, to use for caching raw disk accesses while running
377 Attempt to fix any errors that are found.
381 examines the Venti arenas contained in the given
383 The program detects various error conditions, and optionally attempts
384 to fix any errors that are found.
391 For each arena, scan the entire data section.
392 If this option is omitted, only the end section of
393 the arena is examined.
396 Attempt to fix any errors that are found.
399 Increase the verbosity of output.
402 .B \*9/src/cmd/venti/srv
408 should allow an individual index section to be rebuilt.