Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sd(7) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

format(1M)

mount(1M)

lseek(2)

read(2)

write(2)

directory(3C)

driver.conf(4)

vfstab(4)

vme(4)

cdio(7)

dkio(7)

sd(7)

NAME

sd − driver for SCSI disk devices

SYNOPSIS

sd@target,lun:partition

DESCRIPTION

This driver handles embedded SCSI-2 and CCS-compatible SCSI disk drives, CD-ROM drives, and the Emulex MD21 disk controller for ESDI 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 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 block files are found in /dev/dsk; the names of the raw files are found in /dev/rdsk. 

I/O requests (such as lseek(2)) 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. 

Partition 0 is normally used for the root file system on a disk, partition 1 as a paging area (for example, swap), and partition 2 for backing up the entire disk.  Partition 2 normally maps the entire disk and may also be used as the mount point for secondary disks in the system.  The rest of the disk is normally partition 6.  For the primary disk, the user file system is located here. 

CD-ROM Drive Support

CD-ROM is a removable read-only direct-access device.  CD-ROM drives are designed to work with any disk that meets the Sony-Philips “red-book” or “yellow-book” documents.  They can read CD-ROM data disks, digital audio disks (Audio CD’s) or combined-mode disks, with a mix of audio and data tracks.  This driver supports the SONY CDU-8012 CD-ROM drive controller and other CD-ROM drives which have the same SCSI command set as the SONY CDU-8012.  The type of CD-ROM drive is determined using the SCSI inquiry command. 

A CD-ROM disk is singled sided containing approximately 540 mega-bytes of data or 74 minutes of audio. 

When the device is first opened, the CD-ROM drive’s eject button will be disabled, preventing the manual removal of the disk) until the last close(2) is called. 

There is no volume label stored on the CD-ROM . The disk geometry and partitioning information is always the same.  If the CD-ROM is in ISO 9660 or High Sierra Disk format, it can be mounted as a file system. 

FILES

/dev/dsk/cntndnsn
block files

/dev/rdsk/cntndnsn
raw files

where:

cn controller n

tn SCSI target id n (0-6)

dn SCSI LUN n (0-7)

sn partition n (0-7)

SEE ALSO

format(1M), mount(1M), lseek(2), read(2), write(2), directory(3C), driver.conf(4), vfstab(4), vme(4), cdio(7), dkio(7)

ANSI Small Computer System Interface-2 (SCSI-2)

Emulex MD21 Disk Controller Programmer Reference Manual

DIAGNOSTICS

sd?:  sdtimer: I/O request timeout

A tape I/O operation has taken too long to complete.  A device or host adapter failure may have occurred. 

sd?:  sdtimer: can’t abort request

The driver is unable to find the request in the disconnect queue to notify the device driver that it has failed. 

sd?:  no space for inquiry data
sd?:  no space for disk label

The driver was unable to get enough space for temporary storage.  The driver is unable to open the disk device. 

sd?:  <%s>

The driver has found a SCSI disk device and opened it for the first time.  The disk label is displayed to notify the user. 

sd?:  SCSI bus failure

A host adapter error was detected.  The system may need to be rebooted. 

sd?:  single sector I/O failed

The driver attempted to recover from a transfer by writing each sector, one at a time, and failed.  The disk needs to be reformatted to map out the new defect causing this error. 

sd?:  retry failed
sd?:  rezero failed

A disk operation failed.  The driver first tries to recover by retrying the command, if that fails, the driver rezeros the heads to cylinder 0 and repeats the retries.  A failure of either the retry or rezero operations results in these warning messages; the error recovery operation continues until the retry count is exhausted.  At that time a hard error is posted. 

sd?:  request sense failed

The driver was attempting to determine the cause of an I/O failure and was unable to get more information.  This implies that the disk device may have failed. 

sd?:  warning, abs. block %d has failed %d times

The driver is warning the user that the specified block has failed repeatedly. 

sd?:  block %d needs mapping
sd?:  reassigning defective abs. block %d

The specified block has failed repeatedly and may soon become an unrecoverable failure.  If the driver does not map out the specified block automatically, it is recommend that the user correct the problem. 

sd?:  reassign block failed

The driver attempted to map out a block having excessive soft errors and failed.  The user needs to run format and repair the disk. 

sd?%c: cmd how blk %d (rel. blk %d)
       sense key(0x%x): %s, error code(0x%x): %s

An I/O operation (cmd), encountered an error condition at absolute block (blk %d), partition (sd?%c:), or relative block (rel. block%d).  The error recovery operation (how) indicates whether it retry’ed, restored, or failed. The sense key and error code of the error are displayed for diagnostic purposes.  The absolute blk of the the error is used for mapping out the defective block.  The rel. blk is the block (sector) in error, relative to the beginning of the partition involved.  This is useful for using fsck(1M) to repair a damaged file structure on the disk. 

sd?:  SCSI transport failed: reason ’xxxx’: {retrying|giving up}

The host adapter has failed to transport a command to the target for the reason stated. The driver will either retry the command or, ultimately, give up. 

sd?:  disk not responding to selection

The target disk isn’t responding. You may have accidentally kicked a power cord loose. 

sd?:  disk ok

The target disk is now responding again. 

sd?:  disk offline

The driver has decided that the target disk is no longer there. 

BUGS

These disk drivers assume that you do not have removable media drives, and also that in order to operate normally, a valid SunOS disk label must be in sector zero. 

A logical block size of 512 bytes is required for non-CD devices. 

SunOS 5.1  —  Last change: 8 Oct 1992

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