fsconfig - configuring a file server
filsys name device
When a file server's configuration has not been set, or by explicit request early in the
server's initialization (see fs(8)), the server enters `config mode'. The commands
described here apply only in that mode. They establish configuration constants that are
typically valid for the life of the server, and therefore need be run only once. If the
non-volatile RAM on the server gets erased, it will be necessary to recreate the configu-
In these commands, ipaddr is an IP address in the form 184.108.40.206 and name is a text
string without white space. The syntax of a device is more complicated:
A SCSI disk on target id n2, unit n1, and partition n3. A single number specifies
a unit, while two numbers specify unit.partition, with the missing numbers default-
ing to zero. Any one of the numbers may be replaced by <m-n> to represent the val-
ues m through n inclusive. For example, (w<1-4>) is the concatenation of SCSI tar-
gets 1 through 4.
A SCSI WORM disk on unit n1, target n2, and partition n3. The values are as in w.
A pseudo-device formed from the concatenation of the devices in the list. The
devices are not blank- or comma-separated.
A pseudo-device formed from the block-wise interleaving of the devices in the list.
The size of the result is the number of devices times the size of the smallest
A partition starting at n1% from the beginning of device with a length n2% of the
size of the device. Parenthesize device if it contains periods.
A pseudo-WORM disk: blocks on device can be written only once and may not be read
A cached WORM. The first device is the cache, the second the WORM.
o (Letter o) The read-only (dump) file system of the previously defined cached WORM
The service command sets the textual name of the server as known in the network databases.
The configuration information is stored in block zero on a device whose device string is
written in non-volatile RAM. The config command identifies the device on which the infor-
mation is recorded.
The filsys command configures a file system on device and calls it name. Name is used as
the specifier in attach messages to connect to that file system. (The file system is the
one attached to if the specifier is null; see attach(5)).
The ream command initializes the named file system. It overwrites any previous file sys-
tem on the same device and creates an empty root directory on the device. If name is
main, the file server, until the next reboot, will accept wstat messages (see stat(5))
that change the owner and group of files, to enable initializing a fresh file system from
a mkfs(8) archive.
For the recover command, the named file system must be a cached WORM. Recover clears the
associated magnetic cache and initializes the file system, effectively resetting its con-
tents to the last dump.
The rest of the commands record IP addresses: the file server's address (ip), the local
gateway's (ipgw), the local authentication server's (ipauth), and the local subnet mask
(ipmask). Ipauth should be 0.0.0.0 if the system is doing its own authentication rather
than calling an external authentication server.
The various configuration commands only record what to do; they write no data to disk.
The command end exits config mode and begins running the file server proper. The server
will then perform whatever I/O is required to establish the configuration.
Initialize a file server kgbsun with a single file system interleaved between SCSI targets
3 and 4.
filsys main [w<3-4>]
Initialize a file server kremvax with a single disk on target 0 partitioned as a cached
pseudo-WORM file system with the cache on the third quarter of the drive and the pseudo-
WORM on the interleave of the first, second, and fourth quarters.
filsys main cp(w0)50.25f[p(w0)0.25p(w0)25.25p(w0)75.25]
filsys dump o
Ken Thompson, ``The Plan 9 File Server''.