Technical data

SunOS 5.5 Devices sd(7D)
NAME sd driver for SCSI disk and CD-ROM devices
SYNOPSIS sd@target,lun:partition
DESCRIPTION This driver handles embeddedSCSI-2 and CCS-compatible SCSI disk drives, CD-ROM
drives, and the EmulexMD21 disk controller for ESDI drives.
The type of disk drive is determined using theSCSI 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 sys-
tem.
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 con-
siderably 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 anEINVAL 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
A CD-ROM disk is singled sided containingapproximately 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 inISO 9660 or High Sierra Disk for-
mat, it can be mounted as a file system.
IOCTLS Refer to dkio(7I) and cdio(7I).
ERRORS EACCES Permission denied.
EBUSY The partition was opened exclusivelyby another thread.
EFAULT The argument was a bad address.
EINVAL Invalid argument.
EIO An I/O error occurred.
ENOTTY This indicates that the device does not support the requested ioctl func-
tion.
modified 30 Aug 1995 7D-285