10 syncindex \- prepare and maintain a venti server
94 These commands aid in the setup, maintenance, and debugging of
98 for an overview of the venti system and
100 for an overview of the data structures used by the venti server.
102 Note that the units for the various sizes in the following
103 commands can be specified by appending
108 to indicate kilobytes, megabytes, or gigabytes respectively.
110 To prepare a server for its initial use, the arena partitions and
111 the index sections must be formatted individually, with
116 collection of index sections must be combined into a venti
123 typically a disk partition, into an arena partition.
124 The arenas in the partition are given names of the form
128 is replaced with a sequential number starting at 0.
137 bytes. The default is
139 which was selected to provide a balance
140 between the number of arenas and the ability to copy an arena to external
141 media such as recordable CDs and tapes.
144 The size, in bytes, for read and write operations to the file.
145 The size is recorded in the file, and is used by applications that access the arenas.
150 Create a `version 4' arena partition for backwards compatibility with old servers.
151 The default is version 5, used by the current venti server.
154 Do not zero the data sections of the arenas.
155 Using this option reduces the formatting time
156 but should only be used when it is known that the file was already zeroed.
157 (Version 4 only; version 5 sections are not and do not need to be zeroed.)
163 typically a disk partition, as a venti index section with the specified
165 Each of the index sections in a venti configuration must have a unique name.
172 The size of an index bucket, in bytes.
173 All the index sections within a index must have the same bucket size.
178 Create a `version 1' index section for backwards compatibility with old servers.
179 The default is version 2, used by the current venti server.
182 Do not zero the index.
183 Using this option reduces the formatting time
184 but should only be used when it is known that the file was already zeroed.
185 (Version 1 only; version 2 sections are not and do not need to be zeroed.)
188 reads the configuration file
190 and initializes the index sections to form a usable index structure.
191 The arena files and index sections must have previously been formatted
198 The function of a venti index is to map a SHA1 fingerprint to a location
199 in the data section of one of the arenas. The index is composed of
200 blocks, each of which contains the mapping for a fixed range of possible
203 determines the mapping between SHA1 values and the blocks
204 of the collection of index sections. Once this mapping has been determined,
205 it cannot be changed without rebuilding the index.
206 The basic assumption in the current implementation is that the index
207 structure is sufficiently empty that individual blocks of the index will rarely
208 overflow. The total size of the index should be about 2% to 10% of
209 the total size of the arenas, but the exact percentage depends both on the
210 index block size and the compressed size of blocks stored.
211 See the discussion in
216 also computes a mapping between a linear address space and
217 the data section of the collection of arenas. The
219 option can be used to add additional arenas to an index.
221 add the new arenas to
223 after the existing arenas and then run
227 A copy of the above mappings is stored in the header for each of the index sections.
230 to restore a single index section without rebuilding the entire index.
232 To make it easier to bootstrap servers, the configuration
233 file can be stored in otherwise empty space
234 at the beginning of any venti partitions using
236 A partition so branded with a configuration file can
237 be used in place of a configuration file when invoking any
238 of the venti commands.
241 prints the configuration stored in
243 When invoked with the
247 reads a configuration file from
249 (or else standard input)
252 .SS Checking and Rebuilding
255 populates the index for the Venti system described in
257 The index must have previously been formatted using
259 This command is typically used to build a new index for a Venti
260 system when the old index becomes too small, or to rebuild
261 an index after media failure.
262 Small errors in an index can usually be fixed with
267 file, usually a disk partition, must be large enough to store a copy of the index.
268 This temporary space is used to perform a merge sort of index entries
269 generated by reading the arenas.
275 .BI -B " blockcachesize
276 The amount of memory, in bytes, to use for caching raw disk accesses while running
278 (This is not a property of the created index.)
282 Do not zero the index.
283 This option should only be used when it is known that the index was already zeroed.
284 (Version 1 indexes only; see the discussion in
290 examines the Venti index described in
292 The program detects various error conditions including:
293 blocks that are not indexed, index entries for blocks that do not exist,
294 and duplicate index entries.
295 If requested, an attempt can be made to fix errors that are found.
299 file, usually a disk partition, must be large enough to store a copy of the index.
300 This temporary space is used to perform a merge sort of index entries
301 generated by reading the arenas.
307 .BI -B " blockcachesize
308 The amount of memory, in bytes, to use for caching raw disk accesses while running
313 Attempt to fix any errors that are found.
317 examines the Venti arenas contained in the given
319 The program detects various error conditions, and optionally attempts
320 to fix any errors that are found.
327 For each arena, scan the entire data section.
328 If this option is omitted, only the end section of
329 the arena is examined.
332 Attempt to fix any errors that are found.
335 Increase the verbosity of output.
338 .B \*9/src/cmd/venti/srv
344 should allow an individual index section to be rebuilt.
345 The merge sort could be performed in the space used to store the
346 index rather than requiring a temporary file.