Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cmdk(7) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fdisk(1M)

mount(1M)

lseek(2)

read(2)

write(2)

directory(3C)

vfstab(4)

dkio(7)

cmdk(7)

NAME

cmdk − common disk driver

DESCRIPTION

The cmdk device driver is a common interface to various disk devices.  (In this release of Solaris 2.1 for x86, only SCSI interface disk devices are supported.)  The driver supports magnetic fixed disks, magnetic removable disks, and both 512-byte and 2K-byte CD-ROM drives. 

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 to the magnetic disk must have an offset and transfer length that is a multiple of 512 bytes or the driver returns an EINVAL error.  However, I/O requests to the 2K-byte CD-ROM drive must be a multiple of 2K bytes. Otherwise, the driver returns an EINVAL error, too. 

Slice 0 is normally used for the root file system on a disk, slice 1 as a paging area (for example, swap), and slice 2 for backing up the entire Solaris fdisk partition.  Other slices may be used for usr file systems or system reserved area. 

Fdisk partition 0 is to access the entire disk and is generally used by the fdisk(1M) program. Fdisk partitions 1-4 are used to access other operating systems sharing the same disk, e.g., MS-DOS. 

FILES

/dev/dsk/cntndn[s|p]n
block device

/dev/rdsk/cntndn[s|p]n
raw device where:

cn controller n
tn target id n (0-6)
dn lun n (0-7)
sn UNIX system slice n (0-15)
pn fdisk partition (0-4)

SEE ALSO

fdisk(1M), mount(1M), lseek(2), read(2), write(2), directory(3C), vfstab(4), dkio(7)

SunOS 5.1  —  Last change: 22 January 1993

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