FSCONFIG(8)                                           FSCONFIG(8)

     NAME
          fsconfig - configuring a file server

     SYNOPSIS
          service name

          config device

          filsys name device

          ream name

          recover name

          ip ipaddr

          ipgw ipaddr

          ipmask ipaddr

          ipauth ipaddr

          end

     DESCRIPTION
          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 con-
          figuration 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 nec-
          essary to recreate the configuration.

          In these commands, ipaddr is an IP address in the form
          111.103.94.19 and name is a text string without white space.
          The syntax of a device is more complicated:

          wn1.n2.n3
               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
               defaulting to zero.  Any one of the numbers may be
               replaced by <m-n> to represent the values m through n
               inclusive.  For example, (w<1-4>) is the concatenation
               of SCSI targets 1 through 4.

          rn1.n2.n3
               A SCSI WORM disk on unit n1, target n2, and partition
               n3. The values are as in w.

     FSCONFIG(8)                                           FSCONFIG(8)

          (device...)
               A pseudo-device formed from the concatenation of the
               devices in the list.  The devices are not blank- or
               comma-separated.

          [device...]
               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
               device.

          pdevice.n1.n2
               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.

          fdevice
               A pseudo-WORM disk: blocks on device can be written
               only once and may not be read unless written.

          cdevice1device2
               A cached WORM.  The first device is the cache, the sec-
               ond the WORM.

          o    (Letter o) The read-only (dump) file system of the pre-
               viously defined cached WORM file system.

          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 mes-
          sages 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 system 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

     FSCONFIG(8)                                           FSCONFIG(8)

          contents 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.

     EXAMPLE
          Initialize a file server kgbsun with a single file system
          interleaved between SCSI targets 3 and 4.

               service kgbsun
               config w3
               filsys main [w<3-4>]
               ream main

          Initialize a file server kremvax with a single disk on tar-
          get 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.

               service kremvax
               config p(w0)50.1
               filsys main cp(w0)50.25f[p(w0)0.25p(w0)25.25p(w0)75.25]
               filsys dump o
               ream main

     SOURCE
          /sys/src/fs/port/config.c

     SEE ALSO
          Ken Thompson, ``The Plan 9 File Server''.