VENTI(8)

NAME
venti - an archival block storage server

SYNOPSIS
venti/venti [ -dsw ] [ -a ventiaddress ] [ -B blockcachesize ] [ -c config ] [ -C cachesize ] [ -h httpaddress ] [ -I icachesize ]

venti/sync [ -h host ]

DESCRIPTION
Venti is a block storage server intended for archival data. In a Venti server, the SHA1 hash of a block's contents acts as the block identifier for read and write operations. This approach enforces a write-once policy, preventing accidental or malicious destruction of data. In addition, duplicate copies of a block are coalesced, reducing the consumption of storage and simplifying the implementation of clients.

Storage for venti consists of a data log and an index, both of which can be spread across multiple files. The files containing the data log are themselves divided into self-contained sections called arenas. Each arena contains a large number of data blocks and is sized to facilitate operations such as copying to removable media. The index provides a mapping between the a Sha1 fingerprint and the location of the corresponding block in the data log.

The index and data log are typically stored on raw disk partitions. To improve the robustness, the data log should be stored on a device that provides RAID functionality. The index does not require such protection, since if necessary, it can can be regenerated from the data log. The performance of venti is typically limited to the random access performance of the index. This performance can be improved by spreading the index accross multiple disks.

The storage for venti is initialized using fmtarenas, fmtisect, and fmtindex (see ventiaux(8)). A configuration file, venti.conf(6), ties the index sections and data arenas together.

A Venti server is accessed via an undocumented network protocol. Two client applications are included in this distribution: vac(1) and vacfs(4). Vac copies files from a Plan 9 file system to Venti, creating an archive and returning the fingerprint of the root. This archive can be mounted in Plan 9 using vacfs. These two commands enable a rudimentary backup system. A future release will include a Plan 9 file system that uses Venti as a replacement for the WORM device of fs(4).

The venti server provides rudimentary status information via a built-in http server. The URL files it serves are:

stats
    Various internal statistics.

index
    An enumeration of the index sections and all non empty arenas, including various statistics.

storage
    A summary of the state of the data log.

xindex
    An enumeration of the index sections and all non empty arenas, in XML format.

Several auxiliary utilities (see ventiaux(8)) aid in maintaining the storage for Venti. With the exception of rdarena , these utilities should generally be run after killing the venti server. The utilities are:

checkarenas
    Check the integrity, and optionally fix, Venti arenas.

checkindex
    Check the integrity, and optionally fix, a Venti index.

buildindex
    Rebuild a Venti index from scratch.

rdarena
    Extract a Venti arena and write to standard output.

Options to venti are:

-a ventiaddress
    The network address on which the server listens for incoming connections. The default is

-B blockcachesize
    The size, in bytes, of memory allocated to caching raw disk blocks.

-c config
    Specifies the Venti configuration file. Defaults to

-C cachesize
    The size, in bytes, of memory allocated to caching Venti blocks.

-d  Produce various debugging information on standard error.

-h httpaddress
    The network address of Venti's built-in http server. The default is

-I icachesize
    The size, in bytes, of memory allocated to caching the index mapping fingerprints to locations in venti's data log.

-s  Do not run in the background. Normally, the foreground process will exit once the Venti server is initialized and ready for connections.

-w  Enable write buffering. This option increase the performance of writes to venti at the cost of returning success to the client application before the data has been written to disk. The server implements a sync rpc that waits for completion of all the writes buffered at the time the rpc was received. Applications such as vac(1) and the sync command described below use this rpc to make sure that the data is correctly written to disk. Use of this option is recommended.

The units for the various cache sizes above can be specified by appending a or to indicate kilobytes, megabytes, or gigabytes respectively. The command line options override options found in the venti.conf(6) file.

Sync connects to a running Venti server and executes a sync rpc (described with the -w option above). If sync exits successfully, it means that all writes buffered at the time the command was issued are now on disk.

SOURCE
/sys/src/cmd/venti

SEE ALSO
venti.conf(6), ventiaux(8), vac(1), vacfs(4).
Sean Quinlan and Sean Dorward, ``Venti: a new approach to archival storage'', Usenix Conference on File and Storage Technologies , 2002.