Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ofs(4)

omount(8)

umount(8)

OFSD(8)  —  Maintenance

NAME

ofsd − optical file system daemon

SYNOPSIS

ofsd [−cikrsuz] [−b size] [−f size] [−h hold] [−l length] [−p pad] [−q quota] [−t time] ofs od

DESCRIPTION

ofsd accepts file system operations via ofs to be performed on od. The file system ofs is a character-special device node referencing the OFS pseudo-device driver (see ofs(4)).  The storage medium od is a character-special device node referencing the od device driver or an ordinary file containing an optical file system.  ofsd is normally initiated from the /etc/rc.local script at system startup time.  ofsd establishes a logical relation between the real device od and the pseudo-device ofs, which may then be mounted as a standard UNIX file system (see omount(8)). 

ofsd uses a private cache file /ofs/@<volume> to buffer index records for active files on an optical volume. Each record in this file is the length of a logical block on the file system, and one record is needed for each file that has been altered but not yet flushed; that is, files currently open for writing and directories that have recently been modified.  This file serves to guard the integrity of the optical file system in the event of a catastrophic system failure, and is only used to restore index records when re-mounting a volume after a crash.

When a volume is mounted, the file index records are scanned and an index map is constructed showing the location of the index record for each active file.  The index map is updated as new file index records are generated.  When the volume is demounted, the index map is preserved in the volume map file /ofs/#<volume>. If this file is present when the volume is remounted, the index map is obtained from the map file to expedite the mount process. The file also contains a copy of the root directory attributes, the file system statistics, and the time of the last update, which is verified to insure the map file matches the volume.

OPTIONS

−b The following value is the logical block size in bytes.  This number must be a power of two not less than 128.  The true block size is sensed automatically whenever an optical volume is mounted, so this option is used only for testing.  The default block size is 512 bytes. 

−c Insure file consistency by flushing file index records to disk when files are closed.  If this option is not specified, index records are held in memory for a time after files are closed to facilitate attribute updates.  If this option is specified, files written by archive programs such as tar (which alter file attributes after files are closed) will have redundant index records. 

−f Emulate an optical file system in an ordinary file.  The following value specifies the size of the file in megabytes.  od selects the file to be used, which must already exist.  The default file size is 1 megabyte. 

−h The following value is the drive hold time in seconds.  To optimize access to resources, the user may limit the length of time each volume may remain active in a drive while other volumes are awaiting access.  Once this period has elapsed, if no updates are pending, the volume may be removed from the drive and placed at the end of the queue of waiting volumes.  If a value of zero is supplied, no hold time limit is imposed.  The default hold time is five minutes. 

−i Invert the byte order of numeric fields when writing index records and directory entries.  This option may be specified to maintain consistency on file systems imported from machines employing a different byte order in numeric values.  It only controls the byte order written; index records and directories recorded in either byte order will always be interpreted correctly. 

−k Keep optical file attributes in magnetic disk files for rapid access while volumes are not immediately available.  Volumes included in a CFS model should use this option (see cfs(4)).  This option is useful for access by index number only (as appears in a CFS link) since file name lookup always entails direct volume access. 

−l The following value is the file buffer length in blocks.  To optimize access latency, physical data transfers to and from the optical storage media are accumulated and performed several blocks at a time.  This parameter may be varied to take optimal advantage of the characteristics of various optical disk drives.  The default buffer length is 96 kilobytes. 

−p The following value is the free space padding allowance in blocks per thousand.  If less than this amount of space remains on the volume, only the super-user may create files.  The default padding allowance is one block per thousand. 

−q The following value is the maximum number of contiguous errors accepted without producing a fatal I/O fault.  If this value is zero, no error quota is imposed.  The default error quota is 24. 

−r Read-only — ofsd will mount all file systems read-only.  Physically write-protected volumes are always mounted read-only, whether or not this option is specified. 

−s Slow mount — Examine every file index record while mounting a file system.  The normal fast-mount sequence locates file index records using an index map.  If any record cannot be read, the corresponding file cannot be accessed.  Using the slow-mount option allows a previous version of such a file index record to be located. 

−t The following value is the buffer flush time in seconds.  Due to the write-once nature of optical file storage media, ofsd attempts to maximize optical media utilization by keeping recent updates to a file in memory until the file is closed or flushed.  However, to minimize memory usage and to insure that files remain reasonably current, a memory residence time limit is observed.  If a file on an optical file system is not accessed within this time, pending updates will be posted to the optical medium and the memory buffer space occupied will be released for other uses.  The default buffer flush time is one minute.  If a value of zero is supplied, no time limit is imposed, and file updates may remain pending indefinitely, or until the volume is demounted.  If many files will be written within a short interval, this value should be minimized to conserve space in the index cache file. 

−u Unload volumes to storage whenever they become idle.  This serves to optimize access to subsequent volumes. 

−z Conserve space by not replacing regions with identical contents, and by representing empty (zero) regions as gaps in the file index map, since such gaps appear as empty regions when retrieved.  Checking for identical regions entails reading before writing, which imposes a performance penalty unless the file index map is erased (by opening with the TRUNCATE option) before writing. 

Note: Some option values specified here may be altered when a file system is mounted (see omount(8)).  When a file system is demounted, these option values are restored. 

EXAMPLES

To attach an optical drive: ofsd /dev/of0 /dev/od0 &

To access a fake file system: ofsd /dev/of0 -f20 odfs &

FILES

/ofs/@<volume> optical disk volume index cache. 

/ofs/#<volume> optical disk volume index map. 

SEE ALSO

ofs(4), omount(8), umount(8)

  —  30 September 1992

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