OFSCK(8) — Maintenance
NAME
ofsck − optical file system check
SYNOPSIS
ofsck [−is] [−b size] [−f size] [−l length] [−q quota] [−r [date]] [-volume] od [... od]
DESCRIPTION
ofsck verifies the consistency of an optical file system. od is a character-special device node referencing the od device driver or an ordinary file containing an optical file system. Multiple file systems may be specified, and file systems may be interleaved with option switches. Options are effective for all following file systems.
ofsck reads the private cache file /ofs/$<volume> used by the ofs daemon to buffer index records for active files on an optical volume (see ofsd(8)). 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 used to restore index records when checking a volume after a crash.
When a volume is mounted, an index map is constructed for the volume showing the location of the latest index record for each active file. The index map is preserved in the volume map file /ofs/#<volume>. If this file is present when the volume is checked, the index map is obtained from the map file to expedite the process. The file also contains the time of the last update, which is verified to insure the map file matches the volume. The volume reference number may be specified as a command-line option.
OPTIONS
−b The following value is the logical block size in bytes. This number must be a power of two not less than 256. 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 Confirm — ofsck normally inquires interactively whether to perform any repair on the file system. This option causes ofsck to infer an affirmative response to every inquiry.
−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.
−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.
−l The following value is the file buffer length in blocks. To optimize access latency, physical data transfers 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.
−n Assume a no response to every query. This option is provided for compatibility with fsck. It has the same effect as the read-only option.
−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 — ofsck will check the file system read-only. Physically write-protected volumes are always checked read-only, whether or not this option is specified.
The following value, if supplied, represents a time in the past to which the file system should regress. All files and directories on the volume will appear exactly as they were at that instant in time. More recent files and changes will disappear, and deleted or altered files will be restored to their previous state. The regression time is specified as a single number in any of the forms DD, MMDD, MMDDYY, MMDDhhmm or MMDDYYhhmm, where YY, MM and DD represent the year, month and day, respectively, and hh and mm represent the hour and minute. An initial zero may be omitted. If the month or year is not specified, the most recent matching date is selected. If the hour or minute is not specified, zero is assumed.
−s Slow — Examine every file index record while checking a file system. The normal fast sequence locates file index records using an index map. If any record cannot be read, the corresponding file cannot be accessed. Using the slow option allows an earlier version of such an index record to be identified.
−y Assume a yes response to every query. This option is provided for compatibility with fsck. It has the same effect as the confirm option.
−# Specify the volume reference number. This informs ofsck where the volume was previously mounted so it can find the volume index map and cache files. The volume reference number is the minor device number of the OFS device node used to mount the volume (see omount(8)).
EXAMPLES
To verify an optical volume: ofsck /dev/od0
To verify a fake file system: ofsck -f20 file
FILES
/ofs/#<volume> optical disk volume index map.
/ofs/$<volume> optical disk volume index cache.
SEE ALSO
— 30 September 1990