Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/lib/man/corto.4

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


.TH CORTO 4
.SH NAME
corto \- memory-resident, venti-backed file server
.SH SYNOPSIS
.B corto
[
.B -s
.I scorefile
]
[
.B -d
.I date
]
[
.B -m
.I memory
]
[
.B -v
-I venti
]
[
.B -n
.I name
]
[
.B -l
.I addr
[
.SH DESCRIPTION
.I Corto
is a 9p file server designed as a read/write buffer for a venti server. On startup,
.I corto
reads a vac score from
.IR scorefile ,
or from the environment variable
.I cortoscore
if none is specified, and connects to
.I venti
to read the vac archive. This archive is expected to be in the form of
.IR vac 's
 -a option. If
.B -d
is given,
.I corto
will be initialized from the file tree at
.I date
(which should be in the form yyyy/mmdd); otherwise, the most recent tree in
the archive will be used.
.PP
.I Corto
will load files from venti as requested, on demand, into memory. Writes are
serviced against the memory-resident copy, with any writes overlapping previous
writes to the cache coalesced. The memory-resident file system will grow until it
reaches
.I memory
megabytes (default 1024), after which point files will be removed from the cache
using a Least Recently Used algorithm. Writes will not be removed. If not enough
cache can be freed to satisfy a new read request, the read will be serviced from
venti without adding the file to the cache, making subsequent reads just as slow.
If not enough cache can be freed to satisfy a new write request, the write will
result in an error. Once a day (or on command; see below),
.I corto
will perform a dump of the file system to venti, in a format consistent with vac's
-a option. Once this has been performed, the cache will be re-initialized.
.PP
.I Corto
can optionally take periodic, ephemeral snapshots of the file system. These
snapshots expire on a scheule set by the user. Snapshots are not enabled by
default; the default expiration time once enabled is one hour. Both of these are
configured at the console (see below).
.PP
.I Corto
serves the contents of its memory-resident file system over 9p. A name
specified in the attach will specify a sub-directory to serve; an empty name
defaults to
.BR / .
The special (unrooted) name
.B snapshot
provides access to the unexpired snapshots in the form /yyyy/mmdd.
The 9p interface can be reached over the network at
.IR addr,
if specified, or at
.RI /srv/ name
(default /srv/corto).



.SH CONSOLE
.I Corto
will create a file 
.RI /srv/ name cons
which accepts a set of administrative commands.



.SH EXAMPLES
A representative plan9.ini might contain lines like
.EX
cortoscore=/dev/sdC0/corto
cortosnap=15
cortoretain=60
.EE
.I Corto
would then see these at boot and run the equivalent of
.EX
corto -s /dev/sdC0/corto
echo 'snaptime 15' > /srv/cortocons
echo 'snapretain 60' > /srv/cortocons
.EE
which would have the effect of initializing
.I corto
from the vac score held in /dev/sdC0/corto (presumably a disk partition) and
scheduling snapshots to be taken every 15 minutes and kept for one hour.
.SH SOURCE
None yet.
.SH SEE ALSO
.IR yesterday (1),
.IR fs (4),
.IR srv (4),
.IR fossil (8),
.IR fossilcons (8),
.IR venti (8)
.SH BUGS
Fictional.
.PP
Should likely provide a way to pre-cache common data,
similar to
.IR fs (8)'s
.IR loadcache ,
or a way to permanently fix data to the cache.
.PP
What to do about writes larger than the cache size?
.PP
There is no -a for vac on Plan 9?
.PP
Fossil uses /active/yyyy/mmdd; vac uses /yyyy/mmdd. Who to match?
.PP
Snapshots get expensive.
.PP
Make sure you have a good UPS.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].