fs64 - cached-worm file server, dump
] ... [
is a cached-worm file server that runs
as a user-mode program and can
maintain file systems created by
the original Plan 9 file server
that had its own kernel and operated
a standalone system with disks and
optical-disc jukebox attached.
which could only accept 9P connections over IL/IPv4 on Ethernets
(or over Datakit and Cyclones, long ago),
accepts 9P connections over any network medium and protocol
that it can announce on,
by default TCP (over IPv4 or IPv6).
Given suitable 9P clients,
one could even run 9P over
implements a 16K file system block size
and 32-bit disk addresses,
in order to be compatible with some existing file systems, notably
These parameters can be changed by recompilation.
places its server 9P connection in
and its command pipe in
is the service name.
other than the default
use a newer, faster, and incompatible cache-device layout.
To convert an old file system’s cache to the new layout,
dump the file system, note the last superblock number,
the file system, and start
enter the file server’s configuration mode
before starting normal operation.
name of the file server’s configuration.
Post file descriptor zero in
and read and write protocol messages on file descriptor one.
contains a simple device name
and a replacement per line.
The device name is in the usual
The replacement can be the name of an existing file
will not grow)
or another such device name.
For example, the file
would map accesses to device
to existing file
and accesses to device
if no file named
The file server normally requires all users except
to provide authentication tickets on each
This can be disabled using the
configuration command (see
The group numbered 9999, normally called
on the file server. Any user belonging to that group has
attenuated access privileges. Specifically, when checking such
a user’s access to files, the file’s permission bits are first ANDed
with 0770 for normal files or 0771 for directories. The effect is
to deny world access permissions to
when walking directories.
is always allowed to attach to
without authentication but has minimal permissions.
maintains three file systems
on a combination of disks and
write-once-read-many (WORM) magneto-optical disks.
is a simple disk-based file system not backed by worm.
is a worm-based file system with a disk-based
The disk cache holds
modified worm blocks
to overcome the write-once property of the worm.
The cache also holds recently accessed
non-modified blocks to
speed up the effective access time of the worm.
(usually daily at 5AM) the modified blocks in the
disk cache are
At this time,
traffic to the file system is halted and the
modified blocks are relabeled to the unwritten
portion of the worm.
After the dump,
the file system traffic is continued and
the relabeled blocks are copied to the worm by
a background process.
Each time the main file system is dumped,
its root is appended to a subdirectory of the dump file system.
Since the dump file system is not mirrored with a disk
it is read-only.
The name of the newly added root is created from the date
of the dump:
is the full year,
is the month number,
is the day number and
is a sequence number if more than
one dump is done in a day.
For the first dump,
For the subsequent dumps
is 1, 2, 3, etc.
unhandled troff command .sp
The root of the main file system
that is frozen on the first dump
of March 1, 1992
will be named
in the dump file system.
Changes from fs
IP configuration is ignored and the underlying system’s is used.
commands have been omitted since they (or equivalents) can now be
executed directly on the underlying CPU server,
Files can be used directly as wren devices by giving
a file name rooted at
or using double or single quotes. Such a file name
can be appended to the
device instead of specifying
for IDE disks and
for Marvell SATA disks are not supported; use
to map wren devices to appropriate names under
The file server kernel seems to have scanned PCI buses
in reverse order from the other Plan 9 kernels,
so systems with multiple SCSI cards may find controller
can be used to compensate for this if you don’t want to change
The file server kernel’s
field in NVRAM was overloaded in recent times to hold a
key for the CPU hostowner.
runs on a CPU kernel,
the location of its configuration block must be supplied on the command line.
Disk labels are now implemented for
At the first access of a side,
will attempt to read the label and verify that it has the correct side
number and byte order; if either is wrong, it will issue a warning.
If the label cannot be read,
will attempt to write a new label.
The original file server reserved the rest of the machines RAM for
io buffers. Where
running under the Plan 9 kernel reserves a settable percentage
of the remaining user pages. The percentage is read from the
which when not set is assumed to be 25% (default).
Place the root of the
file system on
and show the modified times of the MIPS C compiler
over all dumps in February, 1992:
ls -l /n/dump/1992/02??/mips/bin/vc
To get only one line of output for each version of the compiler:
ls -lp /n/dump/1992/02??/mips/bin/vc | uniq
“A Cached WORM File System”,
Software – Practice and Experience,
“The 64-bit Standalone Plan 9 File Server”
For the moment,
the file server serves both the old (9P1) and new (9P2000) versions of 9P,
deciding which to serve by sniffing the first packet on each connection.
File system block size and disk address size (32- or 64-bit) are fixed
at compilation time, and this is not easily changed.