1*61591Sbostic.\" Copyright (c) 1986, 1991, 1993 2*61591Sbostic.\" The Regents of the University of California. All rights reserved. 330150Smckusick.\" 447673Scael.\" %sccs.include.redist.man% 530150Smckusick.\" 6*61591Sbostic.\" @(#)vd.4 8.1 (Berkeley) 06/05/93 747673Scael.\" 847673Scael.Dd 947673Scael.Dt VD 4 tahoe 1047673Scael.Os 1147673Scael.Sh NAME 1247673Scael.Nm vd 1347673Scael.Nd 1447673Scael.Tn VERSAbus 1547673Scaelstorage module controller/drives 1647673Scael.Sh SYNOPSIS 1747673Scael.Cd "controller vd0 at vba? csr 0xffff2000 vector vdintr" 1847673Scael.Cd "disk dk0 at vd0 drive 0" 1947673Scael.Sh DESCRIPTION 2047673ScaelThis is a generic 2147673Scael.Tn VERSAbus 2247673Scaelstorage module disk driver for the 2347673ScaelComputer Consoles 2447673Scael.Tn SMD 2547673Scael.Pq Tn VDDC 2647673Scaeland 2747673Scael.Tn SMD-E 2847673Scaeldisk controllers. 2947673Scael.Pp 3047673ScaelThe 3147673Scael.Nm vd 3247673Scaeldriver is a fairly typical block 3347673Scael.Tn I/O 3447673Scaeldevice, except 3547673Scaelraw block 3647673Scael.Tn I/O 3747673Scaelcounts must be a multiple of 1024 bytes, 3834731Skarelswhether the actual sector size is 512 or 1024 bytes. 3934731SkarelsLikewise, 4047673Scael.Xr seek 4130150Smckusickcalls should specify a multiple of 1024 bytes. 4247673ScaelSee 4347673Scael.Xr physio 4 . 4447673Scael.Pp 4534731SkarelsThe first sector of each disk contains a disk label 4634731Skarelscontaining geometry information and partition layouts (see 4747673Scael.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 5147673Scael.Xr disklabel 8 , 5234731Skarelswhich can also be used to write-enable and write-disable the sector. 5347673Scael.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 6647673Scaelseven different drives: 6747673Scael.Tn CDC FSD 6847673Scael(160 6947673Scael.Tn MB ) , 7047673Scael.Tn CDC 7147673Scael9766 (300 7247673Scael.Tn MB ) , 7347673Scael.Tn CDC XFSD 7447673Scael(340 7547673Scael.Tn MB ) , 7647673Scael.Tn CDC 7747673Scael515 7847673Scael.Tn MB , 7947673ScaelFujitsu 360 8047673Scael.Tn MB , 8147673ScaelFujitsu Eagle (440 8247673Scael.Tn MB ) , 8347673Scaeland Maxtor 340 8447673Scael.Tn MB . 8534731SkarelsIf the drive is not recognized, a single small partition is created 8634731Skarelsto allow a label to be written. 8747673Scael.Pp 8834731SkarelsThe partition tables in the disk label and the 8947673Scael.Pa disktab 9034731Skarelsfile specify partition offsets and sizes in sectors, which are 512 bytes 9147673Scaelon 9247673Scael.Tn SMD 9347673Scaeldrives and 1024 bytes on 5 1/4" 9447673Scael.Tn ESDI 9547673Scaeldrives. 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. 10347673Scael.Sh FILES 10447673Scael.Bl -tag -width /dev/dk[0-7][a-f]xx -compact 10547673Scael.It Pa /dev/dk[0-7][a-f] 10647673Scaeldk block files 10747673Scael.It Pa /dev/rdk[0-7][a-f] 10847673Scaeldk raw files 10947673Scael.El 11047673Scael.Sh DIAGNOSTICS 11147673Scael.Bl -diag 11247673Scael.It vd%d: %s controller. 11331722SsamThis message is printed during autoconfiguration to identify 11447673Scaelthe type of controller, either 11547673Scael.Tn VDDC 11647673Scaelor 11747673Scael.Tn SMDE . 11847673Scael.Pp 11947673Scael.It vd%d: init error. 12031722SsamDuring autoconfiguration the controller failed to respond to 12131722Ssaman initialize command. 12247673Scael.Pp 12347673Scael.It vd%d: diagnostic error. 12431722SsamDuring autoconfiguration the controller failed to respond to 12531722Ssama diagnostic command. 12647673Scael.Pp 12747673Scael.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. 13147673Scael.Pp 13247673Scael.It vd%d: drive %d: config error. 13331722SsamThe system encountered a hard error when it tried to configure 13431722Ssama drive during autoconfiguration. 13547673Scael.Pp 13647673Scael.It vd%d: starting drives, wait ... . 13731722SsamThis message indicates the system is about to tell the 13831722Ssamcontroller to ``start'' the drives attached to it. 13947673Scael.Pp 14047673Scael.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. 14447673Scael.Pp 14547673Scael.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. 15247673Scael.Pp 15347673Scael.It vd%d: stray interrupt. 15431722SsamThe system received an unexpected interrupt; it is ignored. 15547673Scael.Pp 15647673Scael.It dk%d%c: write locked. 15734731SkarelsAn attempt was made to write to a drive that is physically write-protected. 15847673Scael.Pp 15947673Scael.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 16147673Scael.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. 16547673Scael.Pp 16647673Scael.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. 17747673ScaelIf this is an 17847673Scael.Tn SMDE 17947673Scaelcontroller, the error code is also displayed. 18047673Scael.Pp 18147673Scael.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. 18447673Scael.Pp 18547673Scael.It "dk%d%c: soft ecc %sing fsbn %d [of %d-%d] (dk%d bn %d cn %d tn %d sn %d)." 18647673ScaelA recoverable 18747673Scael.Tn ECC 18847673Scaelerror was detected and corrected by the controller 18934731Skarelsduring the indicated transfer. 19047673Scael.Pp 19147673Scael.It vd%d: drive %d: couldn't reset. 19231722SsamThe system was unable to reconfigure a drive during a controller reset. 19347673Scael.Pp 19447673Scael.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. 19947673Scael.El 20047673Scael.Sh SEE ALSO 20147673Scael.Xr disklabel 5 , 20247673Scael.Xr disklabel 8 20347673Scael.Sh HISTORY 20447673ScaelThe 20547673Scael.Nm 20647673Scaeldriver appeared in 20747673Scael.Bx 4.3 tahoe . 20847673Scael.Sh BUGS 20931722SsamWrites 21031722Ssamscribble on the tail of incomplete blocks. 21147673Scael.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. 21547673ScaelRaw 21647673Scael.Tn I/O 21747673Scaelshould be permitted on any sector boundary. 218