xref: /illumos-gate/usr/src/man/man4d/cmdk.4d (revision e3ae4b35c024af1196582063ecee3ab79367227d)
te
Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
CMDK 4D "Nov 4, 2008"
NAME
cmdk - common disk driver
SYNOPSIS

cmdk@target, lun : [ partition | slice ]
DESCRIPTION

The cmdk device driver is a common interface to various disk devices. The driver supports magnetic fixed disks and magnetic removable disks.

The cmdk device driver supports three different disk labels: fdisk partition table, Solaris x86 VTOC and EFI/GPT.

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. Raw file names 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.

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 fdisk partition for Solaris software. Other slices may be used for usr file systems or system reserved area.

The fdisk partition 0 is to access the entire disk and is generally used by the fdisk(8) program.

FILES
/dev/dsk/cndn[s|p]n

block device (IDE)

/dev/rdsk/cndn[s|p]n

raw device (IDE) where: cn

controller n.

dn

lun n (0-1).

sn

UNIX system slice n (0-15).

pn

fdisk partition (0-36).

/kernel/drv/cmdk

32-bit kernel module.

/kernel/drv/amd64/cmdk

64-bit kernel module.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Architecture x86
SEE ALSO

lseek (2), read (2), write (2), readdir (3C), dkio (4I), scsi (5), vfstab (5), attributes (7), fdisk (8), mount (8)