BSD 4_4 release
[unix-history] / usr / src / share / man / man4 / man4.tahoe / vd.4
CommitLineData
1e5ea239
KB
1.\" Copyright (c) 1986, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
33186bba 3.\"
ad787160
C
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
33186bba 19.\"
ad787160
C
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
9903e566 31.\"
ad787160
C
32.\" @(#)vd.4 8.1 (Berkeley) 6/5/93
33.\"
34.Dd June 5, 1993
9903e566
CL
35.Dt VD 4 tahoe
36.Os
37.Sh NAME
38.Nm vd
39.Nd
40.Tn VERSAbus
41storage module controller/drives
42.Sh SYNOPSIS
43.Cd "controller vd0 at vba? csr 0xffff2000 vector vdintr"
44.Cd "disk dk0 at vd0 drive 0"
45.Sh DESCRIPTION
46This is a generic
47.Tn VERSAbus
48storage module disk driver for the
49Computer Consoles
50.Tn SMD
51.Pq Tn VDDC
52and
53.Tn SMD-E
54disk controllers.
55.Pp
56The
57.Nm vd
58driver is a fairly typical block
59.Tn I/O
60device, except
61raw block
62.Tn I/O
63counts must be a multiple of 1024 bytes,
1ad79cad
MK
64whether the actual sector size is 512 or 1024 bytes.
65Likewise,
9903e566 66.Xr seek
33186bba 67calls should specify a multiple of 1024 bytes.
9903e566
CL
68See
69.Xr physio 4 .
70.Pp
1ad79cad
MK
71The first sector of each disk contains a disk label
72containing geometry information and partition layouts (see
9903e566 73.Xr disklabel 5 ) .
1ad79cad
MK
74This sector is normally write-protected, and disk-to-disk copies should
75avoid copying this sector.
76The label may be updated with
9903e566 77.Xr disklabel 8 ,
1ad79cad 78which can also be used to write-enable and write-disable the sector.
9903e566 79.Sh DISK SUPPORT
1ad79cad
MK
80During autoconfiguration,
81as well as when a drive is opened after all partitions are closed,
82the first sector of the drive is examined for a disk label.
83If a label is found, the geometry of the drive and the partition tables
84are taken from it.
85If no label is found,
86The driver checks for a disk label on sector 0 of each drive
87during autoconfiguration.
88If no label is found,
89the driver tries to access the last track on each drive
90to determine the type of drive attached.
91The driver has default partition tables for
9903e566
CL
92seven different drives:
93.Tn CDC FSD
94(160
95.Tn MB ) ,
96.Tn CDC
979766 (300
98.Tn MB ) ,
99.Tn CDC XFSD
100(340
101.Tn MB ) ,
102.Tn CDC
103515
104.Tn MB ,
105Fujitsu 360
106.Tn MB ,
107Fujitsu Eagle (440
108.Tn MB ) ,
109and Maxtor 340
110.Tn MB .
1ad79cad
MK
111If the drive is not recognized, a single small partition is created
112to allow a label to be written.
9903e566 113.Pp
1ad79cad 114The partition tables in the disk label and the
9903e566 115.Pa disktab
1ad79cad 116file specify partition offsets and sizes in sectors, which are 512 bytes
9903e566
CL
117on
118.Tn SMD
119drives and 1024 bytes on 5 1/4"
120.Tn ESDI
121drives.
1ad79cad
MK
122By convention,
123the ?a partition is normally used for the root file system or other small
124file system,
125and the ?b partition is used as a paging area.
33186bba
KM
126The ?c partition maps the rest of the pack,
127except the last 5 cylinders which are reserved for bad sector forwarding,
128and diagnostic use.
9903e566
CL
129.Sh FILES
130.Bl -tag -width /dev/dk[0-7][a-f]xx -compact
131.It Pa /dev/dk[0-7][a-f]
132dk block files
133.It Pa /dev/rdk[0-7][a-f]
134dk raw files
135.El
136.Sh DIAGNOSTICS
137.Bl -diag
138.It vd%d: %s controller.
5419b7e7 139This message is printed during autoconfiguration to identify
9903e566
CL
140the type of controller, either
141.Tn VDDC
142or
143.Tn SMDE .
144.Pp
145.It vd%d: init error.
5419b7e7
SL
146During autoconfiguration the controller failed to respond to
147an initialize command.
9903e566
CL
148.Pp
149.It vd%d: diagnostic error.
5419b7e7
SL
150During autoconfiguration the controller failed to respond to
151a diagnostic command.
9903e566
CL
152.Pp
153.It dk%d: unknown drive type.
5419b7e7
SL
154The system was unable to identify the specified drive as
155one of the drives described above; the drive will not be
156configured.
9903e566
CL
157.Pp
158.It vd%d: drive %d: config error.
5419b7e7
SL
159The system encountered a hard error when it tried to configure
160a drive during autoconfiguration.
9903e566
CL
161.Pp
162.It vd%d: starting drives, wait ... .
5419b7e7
SL
163This message indicates the system is about to tell the
164controller to ``start'' the drives attached to it.
9903e566
CL
165.Pp
166.It dk%d: %s <ntrak %d, ncyl %d, nsec %d>.
5419b7e7
SL
167For each drive recognized during autoconfiguration the system
168prints a message of this form. The drive type is displayed
169as well as the geometry: tracks/cylinder, cylinders, and sectors/track.
9903e566
CL
170.Pp
171.It vd%d: lost interrupt.
5419b7e7 172The system failed to receive an interrupt from the controller after
1ad79cad 173submitting a request.
5419b7e7
SL
174The system attempts to abort the current request and simulate an
175interrupt to unwedge the controller.
1ad79cad
MK
176During processing of the simulated interrupt, a controller error
177will be reported as described below.
9903e566
CL
178.Pp
179.It vd%d: stray interrupt.
5419b7e7 180The system received an unexpected interrupt; it is ignored.
9903e566
CL
181.Pp
182.It dk%d%c: write locked.
1ad79cad 183An attempt was made to write to a drive that is physically write-protected.
9903e566
CL
184.Pp
185.It "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."
1ad79cad 186.br
9903e566 187.It "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."
1ad79cad
MK
188An attempted transfer resulted in a controller or drive error.
189The controller or drive is reset, and the transfer is attempted
190a second time.
9903e566
CL
191.Pp
192.It "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."
1ad79cad
MK
193An unrecoverable error was encountered. The filesystem block number reported
194is a logical sector number on the indicated partition;
195it is expressed using 1024-byte sectors.
196If the transfer involved multiple blocks, the block range is printed as well.
197The parenthesized fields list the actual disk sector number
198relative to the beginning of the drive
199(in 512- or 1024-byte blocks, as appropriate),
200as well as the cylinder, track and sector number of the block.
201The error status field of the device control
202block is printed in hexadecimal followed by a symbolic description.
9903e566
CL
203If this is an
204.Tn SMDE
205controller, the error code is also displayed.
206.Pp
207.It "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."
1ad79cad
MK
208A recoverable error was detected by the controller.
209The fields are interpreted in the same way as those for hard errors.
9903e566
CL
210.Pp
211.It "dk%d%c: soft ecc %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d)."
212A recoverable
213.Tn ECC
214error was detected and corrected by the controller
1ad79cad 215during the indicated transfer.
9903e566
CL
216.Pp
217.It vd%d: drive %d: couldn't reset.
5419b7e7 218The system was unable to reconfigure a drive during a controller reset.
9903e566
CL
219.Pp
220.It vd%d: controller timeout.
5419b7e7
SL
221The controller failed to complete an operation within a reasonable
222time. This message is usually followed by another message indicating
223what operation timed out; e.g. ``during config'' for a configuration
224command.
9903e566
CL
225.El
226.Sh SEE ALSO
227.Xr disklabel 5 ,
228.Xr disklabel 8
229.Sh HISTORY
230The
231.Nm
232driver appeared in
233.Bx 4.3 tahoe .
234.Sh BUGS
5419b7e7
SL
235Writes
236scribble on the tail of incomplete blocks.
9903e566 237.Pp
1ad79cad
MK
238The system should use real disk sector numbers internally,
239instead of assuming 1024-byte sectors;
240errors should report filesystem block numbers using the actual sector size.
9903e566
CL
241Raw
242.Tn I/O
243should be permitted on any sector boundary.