HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

intro(7) intro(7)
NAME
intro - introduction to device special files
DESCRIPTION
This section describes the device special files used to access HP peripherals and device drivers. The names
of the entries are generally derived from the type of device being described (such as, disk, terminal), not the
names of the device special files or device drivers themselves. Characteristics of both the hardware device
and the corresponding HP-UX device driver are discussed where applicable.
Device Types
The devices can be classified in two categories,
raw and block. A raw or character-mode device, such as
a line printer, transfers data in an unbuffered stream and uses a character device special file.
Block devices, as the name implies, transfer data in blocks by means of the system’s normal buffering
mechanism. Block devices use block device special files and may have a character device interface also.
Device File Naming Convention
A device special file name becomes associated with a device when the file is created, using the
mksf,
insf,ormknod command. When creating device special files, it is recommended that the following stan-
dard naming convention be used:
/dev/prefix/devspec[options]
prefix indicates the subdirectory for the device class (for example, rdsk for raw device special files for
disks, dsk for block device special files for disks, rmt for raw tape devices).
devspec indicates hardware path information and is typically in the format c#t#d
# as follows:
c# Instance number assigned by the operating system to the interface card. There is no
direct correlation between instance number and physical slot number.
t# Target address on a remote bus (for example, SCSI address).
d# Device unit number at the target address (for example, SCSI LUN).
options Further qualifiers, such as disk section s
# (for backward compatibility), tape density selection for
a tape device, or surface specification for magneto-optical media.
Hardware path information can be derived from
ioscan output.
EXAMPLES
The following is an example of a disk device special file name:
/dev/dsk/c0t6d0
where dsk indicates block disk access and c0t6d0 indicates disk access at interface card instance 0, tar-
get address 6, and unit 0. Absence of s# indicates access to the entire disk (see disk(7) for details).
The following is an example of a tape device special file name:
/dev/rmt/c2t3d0QIC150
where rmt indicates raw magnetic tape, c2 indicates that the device is connected to interface card
instance 2, t3 indicates that target device address is set to 3, d0 indicates that the tape transport resides
at unit address 0, and QIC150 identifies the tape format as QIC150 (see mt(7) for details).
WARNINGS
In the past, other naming conventions have been used for device special files. Using the ln command to
create a link between the old and new standard name is useful as a temporary expedient until all programs
using an old naming convention have been converted.
SEE ALSO
insf(1M), ioscan(1M), lssf(1M), mknod(1M), mksf(1M), hier(5), introduction(9).
The Managing Systems and Workgroupsmanual at http://docs.hp.com
.
HP-UX 11i Version 2: December 2007 Update 1 Hewlett-Packard Company 17