Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sd(4S) — SunOS 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dkio(4S)

SD(4S)  —  DEVICES AND NETWORK INTERFACES

NAME

sd − Disk driver for SCSI Disk Controllers

CONFIG — SUN-3 SYSTEM

controller sc0 at vme24d16 ? csr 0x200000 priority 2 vector scintr 0x40
controller si0 at vme24d16 ? csr 0x200000 priority 2 vector siintr 0x40
controller si0 at obio ? csr 0x140000 priority 2
disk sd0 at sc0 drive 0 flags 0
disk sd1 at sc0 drive 1 flags 0
disk sd0 at si0 drive 0 flags 0
disk sd1 at si0 drive 1 flags 0
disk sd2 at sc0 drive 8 flags 0
disk sd2 at si0 drive 8 flags 0

The first two controller lines above specify the first SCSI host adapter on a Sun-3/160 system.  The third controller line above specifies the first and only SCSI host adapter on a Sun-3/50 system.  The first four disk lines specify the first and second disk drives on the first SCSI controller in a system.  The last two disk lines specify the first disk drive on the second SCSI controller in a system. 

The drive value is calculated using the formula:

8∗target+unit

where target is the SCSI target (controller number on host adapter), and unit is the SCSI logical unit. 

CONFIG — SUN-2 SYSTEM

controller sc0 at mbmem ? csr 0x80000 priority 2
controller sc1 at mbmem ? csr 0x84000 priority 2
controller sc0 at vme24 ? csr 0x200000 priority 2 vector scintr 0x40
disk sd0 at sc0 drive 0 flags 0
disk sd1 at sc0 drive 1 flags 0
disk sd2 at sc1 drive 0 flags 0
disk sd3 at sc1 drive 1 flags 0

The first two controller lines above specify the first and second SCSI host adapters on a Sun-2/120 or Sun-2/170 system.  The third controller line above specifies the first host adapter on a Sun-2/160 system.  The four disk lines specify the first and second disk drives on the first and second SCSI controllers in a system (where each SCSI controller is on a different host adapter). 

CONFIG — Sun386i

controller wds0 at obmem ? csr 0xFB000000 dmachan 7 irq 16 priority 2
disk sd0 at wds0 drive 0 flags 0
disk sd1 at wds0 drive 8 flags 0
disk sd2 at wds0 drive 16 flags 0

The drive value is calculated as described above. 

DESCRIPTION

Files with minor device numbers 0 through 7 refer to various portions of drive 0.  The standard device names begin with “sd” 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 using the system’s normal buffering mechanism and may be read and written without regard to physical disk records.  There is also a “raw” interface that provides for direct transmission between the disk and the user’s read or write buffer.  A single read or write call usually results in one I/O operation; 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, requests to the SCSI disk must have an offset on a 512 byte boundary, and their length must be a multiple of 512 bytes or the driver will return an error (EINVAL).  Likewise seek calls should specify a multiple of 512 bytes. 

Disk Support

On Sun-2, Sun-3, Sun-4 systems, this driver handles all ST-506 and ESDI drives (assuming the correct controller is installed), by reading a label from sector 0 of the drive which describes the disk geometry and partitioning. 

On Sun386i systems, this driver supports the CDC Wren III half-height, and Wren IV full-height drives, which have embedded, CCS-compatible SCSI controllers. 

The sd?a partition is normally used for the root file system on a disk, the sd?b partition as a paging area, and the sd?c
 partition for pack-pack copying (it normally maps the entire disk).  The rest of the disk is normally the sd?g partition. 

FILES

/dev/sd[0-7][a-h] block files

/dev/rsd[0-7][a-h] raw files

SEE ALSO

dkio(4S)

Adaptec ACB 4000 and 5000 Series Disk Controllers OEM Manual  (Sun-2, Sun-3, Sun-4 systems only)
Emulex MD21 SCSI Disk Controller Programmer Reference Manual  (Sun-2, Sun-3, Sun-4 systems only)
Product Specification for Wren III SCSI Model 94211  (Sun386i systems only)
Product Specification for Wren IV SCSI Model 94171  (Sun386i systems only)

DIAGNOSTICS

sd%d%c: cmd how (msg) starting blk %d, blk %d (abs blk %d).
A command such as read or write encountered a error condition (how): either it failed, the unit was restored, or an operation was retry’ed.  The msg is derived from the error number given by the controller, indicating a condition such as “drive not ready” or “sector not found”.  The starting blk is the first sector of the erroneous command, relative to the beginning of the partition involved.  The blk is the sector in error, again relative to the beginning of the partition involved.  The abs blk is the absolute block number of the sector in error. 

Sun Release 4.0  —  Last change: 18 February 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026