All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)vd.4 6.3 (Berkeley) 06/13/88
"disk dk0 at vd0 drive 0"
Files with minor device numbers 0 through 7 refer to various portions of drive 0; minor devices 8 through 15 refer to drive 1, etc. The standard device names begin with ``dk'' followed by the drive number and then a letter a-h for partitions 0-7 respectively. The character ? stands here for a drive number in the range 0-7.
The block files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a `raw' interface which provides for direct transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation, and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw files conventionally begin with an extra `r.'
In raw I/O counts should be a multiple of 1024 bytes, whether the actual sector size is 512 or 1024 bytes. Likewise, seek calls should specify a multiple of 1024 bytes.
The first sector of each disk contains a disk label containing geometry information and partition layouts (see disklabel (5). This sector is normally write-protected, and disk-to-disk copies should avoid copying this sector. The label may be updated with disklabel (8), which can also be used to write-enable and write-disable the sector.
The partition tables in the disk label and the disktab file specify partition offsets and sizes in sectors, which are 512 bytes on SMD drives and 1024 bytes on 5 1/4" ESDI drives. By convention, the ?a partition is normally used for the root file system or other small file system, and the ?b partition is used as a paging area. The ?c partition maps the rest of the pack, except the last 5 cylinders which are reserved for bad sector forwarding, and diagnostic use.
/dev/rdk[0-7][a-f] dk raw files
vd%d: init error. During autoconfiguration the controller failed to respond to an initialize command.
vd%d: diagnostic error. During autoconfiguration the controller failed to respond to a diagnostic command.
dk%d: unknown drive type. The system was unable to identify the specified drive as one of the drives described above; the drive will not be configured.
vd%d: drive %d: config error. The system encountered a hard error when it tried to configure a drive during autoconfiguration.
vd%d: starting drives, wait ... . This message indicates the system is about to tell the controller to ``start'' the drives attached to it.
dk%d: %s <ntrak %d, ncyl %d, nsec %d>. For each drive recognized during autoconfiguration the system prints a message of this form. The drive type is displayed as well as the geometry: tracks/cylinder, cylinders, and sectors/track.
vd%d: lost interrupt. The system failed to receive an interrupt from the controller after submitting a request. The system attempts to abort the current request and simulate an interrupt to unwedge the controller. During processing of the simulated interrupt, a controller error will be reported as described below.
vd%d: stray interrupt. The system received an unexpected interrupt; it is ignored.
dk%d%c: write locked. An attempt was made to write to a drive that is physically write-protected.
dk%d%c: controller err %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d) status %b ecode %x; resetting controller... retrying.
dk%d%c: drive err %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d) status %b ecode %x; resetting drive... retrying. An attempted transfer resulted in a controller or drive error. The controller or drive is reset, and the transfer is attempted a second time.
dk%d%c: hard error %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d) status %b ecode %x. An unrecoverable error was encountered. The filesystem block number reported is a logical sector number on the indicated partition; it is expressed using 1024-byte sectors. If the transfer involved multiple blocks, the block range is printed as well. The parenthesized fields list the actual disk sector number relative to the beginning of the drive (in 512- or 1024-byte blocks, as appropriate), as well as the cylinder, track and sector number of the block. The error status field of the device control block is printed in hexadecimal followed by a symbolic description. If this is an SMDE controller, the error code is also displayed.
dk%d%c: soft error %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d) status %b ecode %x. A recoverable error was detected by the controller. The fields are interpreted in the same way as those for hard errors.
dk%d%c: soft ecc %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d). A recoverable ECC error was detected and corrected by the controller during the indicated transfer.
vd%d: drive %d: couldn't reset. The system was unable to reconfigure a drive during a controller reset.
vd%d: controller timeout. The controller failed to complete an operation within a reasonable time. This message is usually followed by another message indicating what operation timed out; e.g. ``during config'' for a configuration command.
The system should use real disk sector numbers internally, instead of assuming 1024-byte sectors; errors should report filesystem block numbers using the actual sector size. Raw I/O should be permitted on any sector boundary.