Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/venti/freebsd/README

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


This directory contains the Venti file system served by Plan 9 from User Space
on FreeBSD.

To install the plan9port package using pkg(8), issue:

	# pkg install -y devel/plan9port

An unprivileged user should then be created to run the venti service:

	# pw useradd -n venti -c "Venti User" -d /data/venti -s /sbin/nologin

A venti.conf(6) was created with a reasonable set of defaults. A total of 768MB
of memory was dedicated to the file server. 512MB index sections, 2GB arenas
files, and a 256MB bloom filter were chosen to permit incremental growth over
time without sacrificing portability. A 2GB arenasize and the default blocksize
(8KB) were employed; a total of 32GB was initialized.

A script was written to simplify creating needed files based upon venti.conf
and user input, which should be issued as the venti user:

	$ mkventi -a 2g /usr/local/etc/venti.conf
	isect size (in blocks): 65536
	fmtisect /data/venti/isect0: 65,439 buckets of 215 entries, 524,288 bytes for index map
	fmtisect /data/venti/isect1: 65,439 buckets of 215 entries, 524,288 bytes for index map
	arenas size (in blocks): 262144
	fmtarenas /data/venti/arenas00: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas01: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas02: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas03: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas04: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas05: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas06: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas07: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas08: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas09: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas10: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas11: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas12: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas13: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas14: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	fmtarenas /data/venti/arenas15: 1 arenas, 2,146,689,024 bytes storage, 524,288 bytes for index map
	bloom size (in blocks): 32768
	fmtbloom: using 256MB, 32 hashes/score, best up to 47,721,858 blocks
	fmtindex: 16 arenas, 130,877 index buckets, 34,346,762,240 bytes storage

An rc.d service was written to manage Venti:

	# sysrc venti_enable="YES"
	# sysrc venti_user="venti"

Venti was then started and the index verified:

	# service venti start
	# 9 hget http://localhost:8000/index

Arenas on an older file server were then copied via venti/rdarena and
venti/wrarena (see venti-backup(8)). Finally, plan9.ini(8) was updated on the
file server to point to the new venti instance and restarted:

	venti=tcp!10.50.0.24!17034 -g 10.50.0.1 ether /net/ether0 10.50.0.42 255.255.255.0

Steven Stallion
November 2022

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.