1*47673Scael.\" Copyright (c) 1986, 1991 Regents of the University of California. 2*47673Scael.\" All rights reserved. 330150Smckusick.\" 4*47673Scael.\" %sccs.include.redist.man% 530150Smckusick.\" 6*47673Scael.\" @(#)vd.4 6.4 (Berkeley) 03/27/91 7*47673Scael.\" 8*47673Scael.Dd 9*47673Scael.Dt VD 4 tahoe 10*47673Scael.Os 11*47673Scael.Sh NAME 12*47673Scael.Nm vd 13*47673Scael.Nd 14*47673Scael.Tn VERSAbus 15*47673Scaelstorage module controller/drives 16*47673Scael.Sh SYNOPSIS 17*47673Scael.Cd "controller vd0 at vba? csr 0xffff2000 vector vdintr" 18*47673Scael.Cd "disk dk0 at vd0 drive 0" 19*47673Scael.Sh DESCRIPTION 20*47673ScaelThis is a generic 21*47673Scael.Tn VERSAbus 22*47673Scaelstorage module disk driver for the 23*47673ScaelComputer Consoles 24*47673Scael.Tn SMD 25*47673Scael.Pq Tn VDDC 26*47673Scaeland 27*47673Scael.Tn SMD-E 28*47673Scaeldisk controllers. 29*47673Scael.Pp 30*47673ScaelThe 31*47673Scael.Nm vd 32*47673Scaeldriver is a fairly typical block 33*47673Scael.Tn I/O 34*47673Scaeldevice, except 35*47673Scaelraw block 36*47673Scael.Tn I/O 37*47673Scaelcounts must be a multiple of 1024 bytes, 3834731Skarelswhether the actual sector size is 512 or 1024 bytes. 3934731SkarelsLikewise, 40*47673Scael.Xr seek 4130150Smckusickcalls should specify a multiple of 1024 bytes. 42*47673ScaelSee 43*47673Scael.Xr physio 4 . 44*47673Scael.Pp 4534731SkarelsThe first sector of each disk contains a disk label 4634731Skarelscontaining geometry information and partition layouts (see 47*47673Scael.Xr disklabel 5 ) . 4834731SkarelsThis sector is normally write-protected, and disk-to-disk copies should 4934731Skarelsavoid copying this sector. 5034731SkarelsThe label may be updated with 51*47673Scael.Xr disklabel 8 , 5234731Skarelswhich can also be used to write-enable and write-disable the sector. 53*47673Scael.Sh DISK SUPPORT 5434731SkarelsDuring autoconfiguration, 5534731Skarelsas well as when a drive is opened after all partitions are closed, 5634731Skarelsthe first sector of the drive is examined for a disk label. 5734731SkarelsIf a label is found, the geometry of the drive and the partition tables 5834731Skarelsare taken from it. 5934731SkarelsIf no label is found, 6034731SkarelsThe driver checks for a disk label on sector 0 of each drive 6134731Skarelsduring autoconfiguration. 6234731SkarelsIf no label is found, 6334731Skarelsthe driver tries to access the last track on each drive 6434731Skarelsto determine the type of drive attached. 6534731SkarelsThe driver has default partition tables for 66*47673Scaelseven different drives: 67*47673Scael.Tn CDC FSD 68*47673Scael(160 69*47673Scael.Tn MB ) , 70*47673Scael.Tn CDC 71*47673Scael9766 (300 72*47673Scael.Tn MB ) , 73*47673Scael.Tn CDC XFSD 74*47673Scael(340 75*47673Scael.Tn MB ) , 76*47673Scael.Tn CDC 77*47673Scael515 78*47673Scael.Tn MB , 79*47673ScaelFujitsu 360 80*47673Scael.Tn MB , 81*47673ScaelFujitsu Eagle (440 82*47673Scael.Tn MB ) , 83*47673Scaeland Maxtor 340 84*47673Scael.Tn MB . 8534731SkarelsIf the drive is not recognized, a single small partition is created 8634731Skarelsto allow a label to be written. 87*47673Scael.Pp 8834731SkarelsThe partition tables in the disk label and the 89*47673Scael.Pa disktab 9034731Skarelsfile specify partition offsets and sizes in sectors, which are 512 bytes 91*47673Scaelon 92*47673Scael.Tn SMD 93*47673Scaeldrives and 1024 bytes on 5 1/4" 94*47673Scael.Tn ESDI 95*47673Scaeldrives. 9634731SkarelsBy convention, 9734731Skarelsthe ?a partition is normally used for the root file system or other small 9834731Skarelsfile system, 9934731Skarelsand the ?b partition is used as a paging area. 10030150SmckusickThe ?c partition maps the rest of the pack, 10130150Smckusickexcept the last 5 cylinders which are reserved for bad sector forwarding, 10230150Smckusickand diagnostic use. 103*47673Scael.Sh FILES 104*47673Scael.Bl -tag -width /dev/dk[0-7][a-f]xx -compact 105*47673Scael.It Pa /dev/dk[0-7][a-f] 106*47673Scaeldk block files 107*47673Scael.It Pa /dev/rdk[0-7][a-f] 108*47673Scaeldk raw files 109*47673Scael.El 110*47673Scael.Sh DIAGNOSTICS 111*47673Scael.Bl -diag 112*47673Scael.It vd%d: %s controller. 11331722SsamThis message is printed during autoconfiguration to identify 114*47673Scaelthe type of controller, either 115*47673Scael.Tn VDDC 116*47673Scaelor 117*47673Scael.Tn SMDE . 118*47673Scael.Pp 119*47673Scael.It vd%d: init error. 12031722SsamDuring autoconfiguration the controller failed to respond to 12131722Ssaman initialize command. 122*47673Scael.Pp 123*47673Scael.It vd%d: diagnostic error. 12431722SsamDuring autoconfiguration the controller failed to respond to 12531722Ssama diagnostic command. 126*47673Scael.Pp 127*47673Scael.It dk%d: unknown drive type. 12831722SsamThe system was unable to identify the specified drive as 12931722Ssamone of the drives described above; the drive will not be 13031722Ssamconfigured. 131*47673Scael.Pp 132*47673Scael.It vd%d: drive %d: config error. 13331722SsamThe system encountered a hard error when it tried to configure 13431722Ssama drive during autoconfiguration. 135*47673Scael.Pp 136*47673Scael.It vd%d: starting drives, wait ... . 13731722SsamThis message indicates the system is about to tell the 13831722Ssamcontroller to ``start'' the drives attached to it. 139*47673Scael.Pp 140*47673Scael.It dk%d: %s <ntrak %d, ncyl %d, nsec %d>. 14131722SsamFor each drive recognized during autoconfiguration the system 14231722Ssamprints a message of this form. The drive type is displayed 14331722Ssamas well as the geometry: tracks/cylinder, cylinders, and sectors/track. 144*47673Scael.Pp 145*47673Scael.It vd%d: lost interrupt. 14631722SsamThe system failed to receive an interrupt from the controller after 14734731Skarelssubmitting a request. 14831722SsamThe system attempts to abort the current request and simulate an 14931722Ssaminterrupt to unwedge the controller. 15034731SkarelsDuring processing of the simulated interrupt, a controller error 15134731Skarelswill be reported as described below. 152*47673Scael.Pp 153*47673Scael.It vd%d: stray interrupt. 15431722SsamThe system received an unexpected interrupt; it is ignored. 155*47673Scael.Pp 156*47673Scael.It dk%d%c: write locked. 15734731SkarelsAn attempt was made to write to a drive that is physically write-protected. 158*47673Scael.Pp 159*47673Scael.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." 16034731Skarels.br 161*47673Scael.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." 16234731SkarelsAn attempted transfer resulted in a controller or drive error. 16334731SkarelsThe controller or drive is reset, and the transfer is attempted 16434731Skarelsa second time. 165*47673Scael.Pp 166*47673Scael.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." 16734731SkarelsAn unrecoverable error was encountered. The filesystem block number reported 16834731Skarelsis a logical sector number on the indicated partition; 16934731Skarelsit is expressed using 1024-byte sectors. 17034731SkarelsIf the transfer involved multiple blocks, the block range is printed as well. 17134731SkarelsThe parenthesized fields list the actual disk sector number 17234731Skarelsrelative to the beginning of the drive 17334731Skarels(in 512- or 1024-byte blocks, as appropriate), 17434731Skarelsas well as the cylinder, track and sector number of the block. 17534731SkarelsThe error status field of the device control 17634731Skarelsblock is printed in hexadecimal followed by a symbolic description. 177*47673ScaelIf this is an 178*47673Scael.Tn SMDE 179*47673Scaelcontroller, the error code is also displayed. 180*47673Scael.Pp 181*47673Scael.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." 18234731SkarelsA recoverable error was detected by the controller. 18334731SkarelsThe fields are interpreted in the same way as those for hard errors. 184*47673Scael.Pp 185*47673Scael.It "dk%d%c: soft ecc %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d)." 186*47673ScaelA recoverable 187*47673Scael.Tn ECC 188*47673Scaelerror was detected and corrected by the controller 18934731Skarelsduring the indicated transfer. 190*47673Scael.Pp 191*47673Scael.It vd%d: drive %d: couldn't reset. 19231722SsamThe system was unable to reconfigure a drive during a controller reset. 193*47673Scael.Pp 194*47673Scael.It vd%d: controller timeout. 19531722SsamThe controller failed to complete an operation within a reasonable 19631722Ssamtime. This message is usually followed by another message indicating 19731722Ssamwhat operation timed out; e.g. ``during config'' for a configuration 19831722Ssamcommand. 199*47673Scael.El 200*47673Scael.Sh SEE ALSO 201*47673Scael.Xr disklabel 5 , 202*47673Scael.Xr disklabel 8 203*47673Scael.Sh HISTORY 204*47673ScaelThe 205*47673Scael.Nm 206*47673Scaeldriver appeared in 207*47673Scael.Bx 4.3 tahoe . 208*47673Scael.Sh BUGS 20931722SsamWrites 21031722Ssamscribble on the tail of incomplete blocks. 211*47673Scael.Pp 21234731SkarelsThe system should use real disk sector numbers internally, 21334731Skarelsinstead of assuming 1024-byte sectors; 21434731Skarelserrors should report filesystem block numbers using the actual sector size. 215*47673ScaelRaw 216*47673Scael.Tn I/O 217*47673Scaelshould be permitted on any sector boundary. 218