cwfs, cwfs64, cwfs64x, fs64 – cached–worm file server, dump|
cwfs [ –csC ] [ –n service ] [ –a announce–string ] ... [ –m device–map
] [ –f config–device ]|
Cwfs is a cached–worm file server that runs as a user–mode program
and can maintain file systems created by fs(4), the original Plan
9 file server that had its own kernel and operated a standalone
system with disks and optical–disc jukebox attached. Unlike fs(4),
which could only accept 9P connections over IL/IPv4 on
Ethernets (or over Datakit and Cyclones, long ago), cwfs 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 aan(8) or tls(3). |
The stock cwfs implements a 16K file system block size and 32–bit disk addresses, in order to be compatible with some existing file systems, notably emelie's. These parameters can be changed by recompilation.
Cwfs places its server 9P connection in /srv/name and its command pipe in /srv/name.cmd, where name is the service name.
The group numbered 9999, normally called noworld, is special 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 noworld users, except when walking directories.
The user none is always allowed to attach to emelie without authentication but has minimal permissions.
Emelie maintains three file systems on a combination of disks
and write–once–read–many (WORM) magneto–optical disks.
Changes from fs
Various other fs(4) commands have been omitted since they (or equivalents) can now be executed directly on the underlying CPU server, notably date and passwd (see auth/wrkey).
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 w device instead of specifying target and lun numbers.
fs(4)'s device names h for IDE disks and m for Marvell SATA disks are not supported; use –m to map wren devices to appropriate names under /dev/sd*.
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 numbering reversed. –m can be used to compensate for this if you don't want to change filsys declarations.
The file server kernel's config field in NVRAM was overloaded in recent times to hold a secstore(1) key for the CPU hostowner. Since cwfs runs on a CPU kernel, the location of its configuration block must be supplied on the command line.
Disk labels are now implemented for l devices. At the first access of a side, cwfs 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, cwfs will attempt to write a new label.
The original file server reserved the rest of the machines RAM for io buffers. Where cwfs running under the Plan 9 kernel reserves a settable percentage of the remaining user pages. The percentage is read from the environment variable fsmempercent which when not set is assumed to be 25% (default).
Place the root of the dump file system on /n/dump and show the
modified times of the MIPS C compiler over all dumps in February,
yesterday(1), fs(3), sd(3), fs(4), srv(4), fs(8), fsconfig(8)|
Sean Quinlan, ``A Cached WORM File System'', Software – Practice and Experience, December, 1991
Ken Thompson, Geoff Collyer, ``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.