venti 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. .TH VENTI 8
  2. .SH NAME
  3. venti \- an archival block storage server
  4. .SH SYNOPSIS
  5. .B venti/venti
  6. [
  7. .B -dsw
  8. ]
  9. [
  10. .B -a
  11. .I ventiaddress
  12. ]
  13. [
  14. .B -B
  15. .I blockcachesize
  16. ]
  17. [
  18. .B -c
  19. .I config
  20. ]
  21. [
  22. .B -C
  23. .I cachesize
  24. ]
  25. [
  26. .B -h
  27. .I httpaddress
  28. ]
  29. [
  30. .B -I
  31. .I icachesize
  32. ]
  33. .PP
  34. .B venti/sync
  35. [
  36. .B -h
  37. .I host
  38. ]
  39. .SH DESCRIPTION
  40. .I Venti
  41. is a block storage server intended for archival data.
  42. In a Venti server,
  43. the SHA1 hash of a block's contents acts as the block
  44. identifier for read and write operations.
  45. This approach enforces a write-once policy, preventing accidental or
  46. malicious destruction of data. In addition, duplicate copies of a
  47. block are coalesced, reducing the consumption of storage and
  48. simplifying the implementation of clients.
  49. .PP
  50. Storage for
  51. .I venti
  52. consists of a data log and an index, both of which
  53. can be spread across multiple files.
  54. The files containing the data log are themselves divided into self-contained sections called arenas.
  55. Each arena contains a large number of data blocks and is sized to
  56. facilitate operations such as copying to removable media.
  57. The index provides a mapping between the a Sha1 fingerprint and
  58. the location of the corresponding block in the data log.
  59. .PP
  60. The index and data log are typically stored on raw disk partitions.
  61. To improve the robustness, the data log should be stored on
  62. a device that provides RAID functionality. The index does
  63. not require such protection, since if necessary, it can
  64. can be regenerated from the data log.
  65. The performance of
  66. .I venti
  67. is typically limited to the random access performance
  68. of the index. This performance can be improved by spreading the
  69. index accross multiple disks.
  70. .PP
  71. The storage for
  72. .I venti
  73. is initialized using
  74. .IR fmtarenas ,
  75. .IR fmtisect ,
  76. and
  77. .I fmtindex
  78. (see
  79. .IR ventiaux (8)).
  80. A configuration file,
  81. .IR venti.conf (6),
  82. ties the index sections and data arenas together.
  83. .PP
  84. A Venti
  85. server is accessed via an undocumented network protocol.
  86. Two client applications are included in this distribution:
  87. .IR vac (1)
  88. and
  89. .IR vacfs (4).
  90. .I Vac
  91. copies files from a Plan 9 file system to Venti, creating an
  92. archive and returning the fingerprint of the root.
  93. This archive can be mounted in Plan 9 using
  94. .IR vacfs .
  95. These two commands enable a rudimentary backup system.
  96. A future release will include a Plan 9 file system that uses
  97. Venti as a replacement for the WORM device of
  98. .IR fs (4).
  99. .PP
  100. The
  101. .I venti
  102. server provides rudimentary status information via
  103. a built-in http server. The URL files it serves are:
  104. .TP
  105. .B stats
  106. Various internal statistics.
  107. .TP
  108. .B index
  109. An enumeration of the index sections and all non empty arenas, including various statistics.
  110. .TP
  111. .B storage
  112. A summary of the state of the data log.
  113. .TP
  114. .B xindex
  115. An enumeration of the index sections and all non empty arenas, in XML format.
  116. .PP
  117. Several auxiliary utilities (see
  118. .IR ventiaux (8))
  119. aid in maintaining the storage for Venti.
  120. With the exception of
  121. .I rdarena ,
  122. these utilities should generally be run after killing the
  123. .I venti
  124. server.
  125. The utilities are:
  126. .TP
  127. .I checkarenas
  128. Check the integrity, and optionally fix, Venti arenas.
  129. .TP
  130. .I checkindex
  131. Check the integrity, and optionally fix, a Venti index.
  132. .TP
  133. .I buildindex
  134. Rebuild a Venti index from scratch.
  135. .TP
  136. .I rdarena
  137. Extract a Venti arena and write to standard output.
  138. .PD
  139. .PP
  140. Options to
  141. .I venti
  142. are:
  143. .TP
  144. .BI -a " ventiaddress
  145. The network address on which the server listens for incoming connections.
  146. The default is
  147. .LR tcp!*!venti .
  148. .TP
  149. .BI -B " blockcachesize
  150. The size, in bytes, of memory allocated to caching raw disk blocks.
  151. .TP
  152. .BI -c " config
  153. Specifies the
  154. Venti
  155. configuration file.
  156. Defaults to
  157. .LR venti.conf .
  158. .TP
  159. .BI -C " cachesize
  160. The size, in bytes, of memory allocated to caching
  161. Venti
  162. blocks.
  163. .TP
  164. .BI -d
  165. Produce various debugging information on standard error.
  166. .TP
  167. .BI -h " httpaddress
  168. The network address of Venti's built-in
  169. http
  170. server.
  171. The default is
  172. .LR tcp!*!http .
  173. .TP
  174. .BI -I " icachesize
  175. The size, in bytes, of memory allocated to caching the index mapping fingerprints
  176. to locations in
  177. .IR venti 's
  178. data log.
  179. .TP
  180. .B -s
  181. Do not run in the background.
  182. Normally,
  183. the foreground process will exit once the Venti server
  184. is initialized and ready for connections.
  185. .TP
  186. .B -w
  187. Enable write buffering. This option increase the performance of writes to
  188. .I venti
  189. at the cost of returning success to the client application before the
  190. data has been written to disk.
  191. The server implements a
  192. .I sync
  193. rpc that waits for completion of all the writes buffered at the time
  194. the rpc was received.
  195. Applications such as
  196. .IR vac (1)
  197. and the
  198. .I sync
  199. command described below
  200. use this rpc to make sure that the data is correctly written to disk.
  201. Use of this option is recommended.
  202. .PD
  203. .PP
  204. The units for the various cache sizes above can be specified by appending a
  205. .LR k ,
  206. .LR m ,
  207. or
  208. .LR g
  209. to indicate kilobytes, megabytes, or gigabytes respectively.
  210. The command line options override options found in the
  211. .IR venti.conf (6)
  212. file.
  213. .PP
  214. .I Sync
  215. connects to a running Venti server and executes a sync rpc
  216. (described with the
  217. .B -w
  218. option above).
  219. If sync exits successfully, it means that all writes buffered at the
  220. time the command was issued are now on disk.
  221. .SH SOURCE
  222. .B /sys/src/cmd/venti
  223. .SH "SEE ALSO"
  224. .IR venti.conf (6),
  225. .IR ventiaux (8),
  226. .IR fs (3),
  227. .IR vac (1),
  228. .IR vacfs (4).
  229. .br
  230. Sean Quinlan and Sean Dorward,
  231. ``Venti: a new approach to archival storage'',
  232. .I "Usenix Conference on File and Storage Technologies" ,
  233. 2002.