.TH BUILDINDEX 8
.SH NAME
buildindex \- rebuild a Venti index
.SH SYNOPSIS
.B venti/buildindex
[
.B -B
.I blockcachesize
]
[
.B -Z
]
.I venti.config
.I tmp
.SH DESCRIPTION
.I Buildindex
populates the index for the Venti system described in
.IR venti.config .
The index must have previously been formatted using
.IR fmtindex (8).
This command is typically used to build a new index for a Venti
system when the old index becomes too small, or to rebuild
an index after media failure.
Small errors in an index can usually be fixed with
.IR checkindex (8).
.PP
The
.I tmp
file, usually a disk partition, must be large enough to store a copy of the index.
This temporary space is used to perform a merge sort of index entries
generated by reading the arenas.
.PP
Options to 
.I buildindex
are:
.TP
.BI -B " blockcachesize
The amount of memory, in bytes, to use for caching raw disk accesses while running
.IR buildindex .
(This is not a property of the created index.)
The default is 8k.
The units for the size can be specified by appending
.LR k ,
.LR m ,
or
.LR g
to indicate kilobytes, megabytes, or gigabytes respectively.
.TP
.B -Z
Do not zero the index.
This option should only be used when it is known that the index was already zeroed.
.SH SOURCE
.B /sys/src/cmd/venti
.SH "SEE ALSO"
.IR venti (8),
.IR checkindex (8),
.IR fmtindex (8),
.IR venti.conf (6)
.SH BUGS
Should allow an individual index section to be rebuilt.
The merge sort could be performed in the space used to store the
index rather than requiring a temporary file.
