11 syncindex \- prepare and maintain a venti server
109 These commands aid in the setup, maintenance, and debugging of
113 for an overview of the venti system and
115 for an overview of the data structures used by the venti server.
117 Note that the units for the various sizes in the following
118 commands can be specified by appending
123 to indicate kilobytes, megabytes, or gigabytes respectively.
125 To prepare a server for its initial use, the arena partitions and
126 the index sections must be formatted individually, with
131 collection of index sections must be combined into a venti
138 typically a disk partition, into an arena partition.
139 The arenas in the partition are given names of the form
143 is replaced with a sequential number starting at 0.
152 bytes. The default is
154 which was selected to provide a balance
155 between the number of arenas and the ability to copy an arena to external
156 media such as recordable CDs and tapes.
159 The size, in bytes, for read and write operations to the file.
160 The size is recorded in the file, and is used by applications that access the arenas.
165 Create a `version 4' arena partition for backwards compatibility with old servers.
166 The default is version 5, used by the current venti server.
169 Do not zero the data sections of the arenas.
170 Using this option reduces the formatting time
171 but should only be used when it is known that the file was already zeroed.
172 (Version 4 only; version 5 sections are not and do not need to be zeroed.)
178 typically a disk partition, as a venti index section with the specified
180 Each of the index sections in a venti configuration must have a unique name.
187 The size of an index bucket, in bytes.
188 All the index sections within a index must have the same bucket size.
193 Create a `version 1' index section for backwards compatibility with old servers.
194 The default is version 2, used by the current venti server.
197 Do not zero the index.
198 Using this option reduces the formatting time
199 but should only be used when it is known that the file was already zeroed.
200 (Version 1 only; version 2 sections are not and do not need to be zeroed.)
211 .BI -n " nblock \fR| " -N " nhash
212 The number of blocks expected to be indexed by the filter
213 or the number of hash functions to use.
217 is given, it is used, along with the total size of the filter,
218 to compute an appropriate
222 The size of the bloom filter. The default is the total size of the file.
225 is rounded down to a power of two.
230 argument in the commands above can be of the form
232 to specify a range of the file.
236 are specified in bytes but can have the usual
247 This notation eliminates the need to
248 partition raw disks on non-Plan 9 systems.
251 reads the configuration file
253 and initializes the index sections to form a usable index structure.
254 The arena files and index sections must have previously been formatted
261 The function of a venti index is to map a SHA1 fingerprint to a location
262 in the data section of one of the arenas. The index is composed of
263 blocks, each of which contains the mapping for a fixed range of possible
266 determines the mapping between SHA1 values and the blocks
267 of the collection of index sections. Once this mapping has been determined,
268 it cannot be changed without rebuilding the index.
269 The basic assumption in the current implementation is that the index
270 structure is sufficiently empty that individual blocks of the index will rarely
271 overflow. The total size of the index should be about 2% to 10% of
272 the total size of the arenas, but the exact percentage depends both on the
273 index block size and the compressed size of blocks stored.
274 See the discussion in
279 also computes a mapping between a linear address space and
280 the data section of the collection of arenas. The
282 option can be used to add additional arenas to an index.
284 add the new arenas to
286 after the existing arenas and then run
290 A copy of the above mappings is stored in the header for each of the index sections.
293 to restore a single index section without rebuilding the entire index.
295 To make it easier to bootstrap servers, the configuration
296 file can be stored in otherwise empty space
297 at the beginning of any venti partitions using
299 A partition so branded with a configuration file can
300 be used in place of a configuration file when invoking any
301 of the venti commands.
304 prints the configuration stored in
306 When invoked with the
310 reads a configuration file from
312 (or else standard input)
315 .SS Checking and Rebuilding
318 populates the index for the Venti system described in
320 The index must have previously been formatted using
322 This command is typically used to build a new index for a Venti
323 system when the old index becomes too small, or to rebuild
324 an index after media failure.
325 Small errors in an index can usually be fixed with
330 file, usually a disk partition, must be large enough to store a copy of the index.
331 This temporary space is used to perform a merge sort of index entries
332 generated by reading the arenas.
338 .BI -B " blockcachesize
339 The amount of memory, in bytes, to use for caching raw disk accesses while running
341 (This is not a property of the created index.)
345 Do not zero the index.
346 This option should only be used when it is known that the index was already zeroed.
347 (Version 1 indexes only; see the discussion in
353 examines the Venti index described in
355 The program detects various error conditions including:
356 blocks that are not indexed, index entries for blocks that do not exist,
357 and duplicate index entries.
358 If requested, an attempt can be made to fix errors that are found.
362 file, usually a disk partition, must be large enough to store a copy of the index.
363 This temporary space is used to perform a merge sort of index entries
364 generated by reading the arenas.
370 .BI -B " blockcachesize
371 The amount of memory, in bytes, to use for caching raw disk accesses while running
376 Attempt to fix any errors that are found.
380 examines the Venti arenas contained in the given
382 The program detects various error conditions, and optionally attempts
383 to fix any errors that are found.
390 For each arena, scan the entire data section.
391 If this option is omitted, only the end section of
392 the arena is examined.
395 Attempt to fix any errors that are found.
398 Increase the verbosity of output.
401 .B \*9/src/cmd/venti/srv
407 should allow an individual index section to be rebuilt.
408 The merge sort could be performed in the space used to store the
409 index rather than requiring a temporary file.