Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsattach(cmds) — Sprite KS.390

Media Vault

Software Library

Restoration Projects

Artifacts Sought

FSATTACH  —  User Commands

NAME

fsattach − Check disks and export prefixes

SYNOPSIS

fsattach [options]

OPTIONS

−m fileRead mount table from file. 

−WCheck disks, but do not write changes. 

−fDon’t check disks (fastboot). 

−sIgnore group information found in mount table and run fscheck sequentially. 

−vHave both fsattach and fscheck  output verbose information while running. 

−nDon’t attach disks or export prefixes. 

−pPrint out actions but don’t execute them. 

−helpPrint a summary of the command-line options and exit. 

−d deviceDirectory
Specifies the directory containing the device files. The default is "/dev".

−kProduce debugging output. 

−i spriteIDCauses prefixes that this machine will export to be preloaded into the prefix table.  This prevents the machine from broadcasting for its own prefixes while the disks are being checked. 

−j maxJobsThe default behavior is for fsattach to run as many fscheck jobs in parallel as it can.  The parallelism is limited by the group of each device (see below), and the −j flag.  If this flag is used then at most maxJobs fschecks will be run at a time. 

−fscheck fscheckProg
Use this to specify an alternative fscheck program, i.e. when testing a new fscheck.

−c 15Conditionally check the disks.  If the disks were just checked by fscheck and we are now rebooting, then we don’t have to check again.  If the −c flag is present then the disks won’t be rechecked. 
 

DESCRIPTION

Fsattach is used during system boot to check the disks for inconsistencies and to export prefixes.  The input to fsattach is a mount table, usually in /hosts/$HOST/mount.  The location of the mount table is specified by the −m option.  Fsattach uses the pass information in the mount table to create child processes that check the disk partitions using fscheck.  The output from fscheck is appended to a file with the same name as the device and the suffix ".fsc".  If fscheck completes normally, then the filesystem is mounted and its prefix exported. 

MOUNT TABLE

The mount table contains information on checking the disks and on exporting prefixes.  Each line in the table consists of a command and its arguments.  Blank lines and lines that begin with ’#’ are ignored.  The Attach command is used to check a disk partition and to attach the partition to the file system.  Attach commands have the following format:

Attach prefix device group scope access

Prefix is the prefix under which to mount the partition. 

The device is the device on which to run fscheck and to attach. 

The group parameter is used to determine the parallelism in checking the disks. Fscheck is a very IO constrained application.  Most of the execution time is spent waiting for the disk.  If the system has more than one disk the overall run time of fsattach can be decreased by checking different disks at the same time.  Fsattach will run jobs in parallel if possible.  Any partitions that are in the same group  will NOT be checked in parallel.  A group name is any sequence of characters and is case sensitive.  The group name "root" has special significance.  It is used as the group of the root partition.  This partition is checked before all other partitions, and the server may have to reboot if an error is found in this partition. 

The scope can be either local or export.  Partitions with local scope are attached only for the local machine, whereas partitions with export scope are attached and exported under the given prefix.  The prefix corresponding to the root partition (usually /bootTmp) is attached during system boot and is not reattached by fsattach.  For this partition the scope parameter does not have any effect. 

The access is used to set the access permissions of the prefix.  If the access is "r" then the prefix is read only.  If the access is "rw" then the prefix is can be both read and written.  The access parameter has no effect if the partition is the root partition. 

The Export command is used to export a prefix under a different name.  Export commands have the following format:

Export prefix localPath

Prefix is the name of the prefix to be exported. 

LocalPath is the name of a path that is to be exported as prefix. 

All other non-comment lines are interpreted as containing arguments to fscheck.  The format of these lines is:

deviceName [arguments]

DeviceName is the name of the device for which fscheck is to use the arguments. A device name of all will cause fscheck to use the arguments for all devices. Any number of arguments can follow the device name, as long as they fit on a single line.  The same device name can appear on any number of lines. 

The following is a sample mount table. The root partition is /dev/rsd0a and it is exported under the prefix /t1.  /t2 is another small partition on the same disk.  /b is a large partition on the disk, and /a is a large partition that is an entire second disk.  #<Command>      <Prefix>        <Device/Path> <Group>   <Scope>       <Access>
 
Attach          /t1        /dev/rsd0a     root     export          rw Attach          /t2             /dev/rsd0b      A       export          rw Attach          /b              /dev/rsd0g      A       export          rw Attach          /a              /dev/rsd1c      B       export          rw
 
Export/foo/t2
 
#<Device>       <Arguments to fscheck>
 
all             -readBlock 10 /dev/rsd0b      -outputFile foo

RETURN CODES

Fsattach returns one of the following codes upon exit. 

0No error. 

1An error was found in the root partition. Reboot the system. See fscheck for details. 

2A hard error occurred. There was some problem in either fsattach, fscheck, or prefix that prevented fsattach from completing normally. 

3Fscheck returned a soft error indication. See fscheck for details. 

4An error was found in the root partition, but the number of consecutive times that fscheck was run and an error found exceeds the limit. 

FILES

/boot/cmds/fscheckcommand to check disks
/hosts/$HOST/∗.fscoutput from fscheck
/bootTmp/.fscheck.outtemporary output from fscheck

KEYWORDS

fsattach, fscheck, prefix, mount, disk, partition, crash, attach, boot
 

Sprite version 1.0  —  January 12, 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026