SD(4S) — DEVICES AND NETWORK INTERFACES
NAME
sd − driver for SCSI disk devices
CONFIG — SOLBOURNE SERIES 5, 5E, 6
controller si0 at kbio ? csr ? priority 2
disk sd0 at si0 drive 0x00 flags 0x4a
disk sd1 at si0 drive 0x01 flags 0x4a
disk sd2 at si0 drive 0x02 flags 0x4a
disk sd3 at si0 drive 0x03 flags 0x4a
controller sv2 at vme16d16 ? csr 0x8000 dma vme24d32
priority 2 vector svintr 0x52
disk sd20 at sv2 drive 0x00 flags 0x4a
disk sd21 at sv2 drive 0x01 flags 0x4a
disk sd22 at sv2 drive 0x02 flags 0x4a
disk sd23 at sv2 drive 0x03 flags 0x4a
CONFIG — SOLBOURNE S4000, S3000
controller si0 at obio ? csr 0x20 priority 4
disk sd0 at si0 drive 0x00 flags 0x4a
disk sd1 at si0 drive 0x01 flags 0x4a
disk sd2 at si0 drive 0x02 flags 0x4a
disk sd3 at si0 drive 0x03 flags 0x4a
All SCSI devices in a Solbourne system use a three layer device driver scheme. The top layer supports a specific type of device (for example disk sd(4s), tape st(4s) or CDROM sd(4s)), the middle layer contains common code (scsi(4)), and the lower layer supports specific host adaptor hardware (for example SCSI IOASIC si(4), or SCSI VMEbus sv(4s)). The controller lines above specify the SCSI host adaptor.
The lines following the controller specification lines define the available disk devices. This man page describes the top layer operations for SCSI compatible disks.
The first two controller lines above specify SCSI host adaptor on a Solbourne system (see si(4S), and sv(4S)). The disk lines specify the drives on the host adaptor.
The drive value is calculated using the formula:
16∗lun+target
where target is the SCSI target (controller number on host adaptor), and lun is the SCSI logical unit.
Bit 0 of flags may be SET to specify that the device does NOT support disconnect/reconnect on the SCSI bus. Bit 1 of flags may be SET to specify that the driver should negotiate with the device for synchronous SCSI transfers. Bit 2 of flags may be SET to specify that the device does NOT support parity on the SCSI bus. Bit 3 of flags may be SET to specify that standard commands that are going to transfer a small amount of data can, if nothing else is active, avoid doing a disconnect. Bit 4 of flags may be SET to specify the device supports multiple luns active simultaneously. Bit 5 of flags may be SET to specify the device supports only simple (COMMAND_COMPLETE) SCSI messages. Bit 6 of flags may be SET to specify that command combining optimizations can be performed. Bit 7 of flags may be SET to enable tag command queuing to the drive (even with sd_auto_queue == 0). Bit 8 of flags may be SET to disable 16-bit wide SCSI bus transfers, even for devices which support it.
The file /sys/dev/sdconf.c contains a description of disks supported by this controller. Only those drives with special error code considerations are described here. This file also allows SCSI tagged command queuing to be disabled for particular types of disk drives.
DESCRIPTION
Files with minor device numbers 0 through 7 refer to various portions of drive 0; minor devices 8 through 15 refer to drive 1, and so on. The driver, through use of multiple major devices, supports up to 256 drives.
The standard device names begin with sd followed by the drive number (0-255) and then a letter (a-h) for partitions 0-7 respectively.
The block-files access the disk using the system’s normal buffering mechanism and are 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; raw I/O is therefore considerably more efficient when many bytes are transmitted. The names of the raw files conventionally begin with an extra ‘r.’
I/O requests (such as lseek (2V)) to the SCSI disk must have an offset that is a multiple of 512 bytes (DEV_BSIZE), or the driver returns an EINVAL error. If the transfer length is not a multiple of 512 bytes, the transfer count is rounded up by the driver.
Disk Support
On Solbourne systems, this driver handles all SCSI CCS compatible disk drives. The type of disk drive is determined using the SCSI inquiry command and reading the volume label stored on block 0 of the drive. The volume label describes the disk geometry and partitioning; it must be present or the disk cannot be mounted by the system. The format(8s) utility is used to both format and label disks.
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. For the primary disk, the /usr file system is located here.
FILES
/dev/sd[0-n][a-h] block files
/dev/rsd[0-n][a-h] raw files
SEE ALSO
dkio(4S), directory(3V), lseek(2V), read(2V), write(2V) scsi(4S), si(4S), sv(4S), format(8).
DIAGNOSTICS
sd%d: adaptor%d target %d lun %d: lun not supported.
The lun number is not supported by the target.
sd%d: adaptor%d target %d lun %d: 0x%x not a DISK.
The target is not a disk. Check the target id jumpered on the drive.
sd%d: adaptor%d target %d lun %d: online: %s
The drive is now spun up and online. Information pertaining to the manufacturing, model, and firmware revision is displayed.
sd%d: adaptor%d target %d lun %d: offline
The drive has been spun down and placed offline.
sd%d: error reading label.
An unrecoverable error occurred while trying to read the label. Drive may need to be formatted.
sd%d: label: bad magic number.
The label magic number in incorrect. The drive needs to be labeled or formatted.
sd%d: label: corrupt
The checksum of the label is incorrect. The drive needs to be labeled or formatted.
sd%d: label: < label >
The label was successfully read and driver partition tables initialized.
sd%d: non extended sense.
The sense data returned was not in extended format. Drive does not conform to CCS.
sd%d: reassigning defective block %d
A media error was reported on a block, or excessive soft errors occurred on the block. The block is being reassigned to another location on the disk.
sd%d: {rezero | reassign | respin} failed
A recovery operation has failed.
BUGS
A logical block size of 512 bytes is assumed (and enforced on S4000).
Solbourne Computer, Inc. — 11 Jan 1994