hpunix

Page 117

Configuring Device Files

the physical disk. This can significantly improve I/O for disks and CD-ROMs. Block device files are sometimes called "block" device files.

Terminals, modems, printers, plotters, and tape drives typically only have character device files. Disks and CD-ROMs may be accessed in either character or block mode, and thus typically have both types of device files. Some applications and utilities prefer to access disks directly via a character device files. Other utilities require a block device file. Read the application or utility documentation to determine which device file is required.

Device File Major Numbers Every device file has a "major number" that appears in the fifth field of the ll output. The major number identifies the "kernel driver" that should be used when the device is accessed. A kernel driver is a portion of code in the HP-UX kernel that controls I/O for a particular type of device. Most HP-UX machines have multiple drivers; the major number on every device file determines which driver should be used. The lsdev command lists the drivers configured in your kernel, and their associated major numbers.

Device File Minor Numbers Every device file has an associated minor number. The “minor number” is a 24-bit hexadecimal number that identifies:

• The physical location of the device on the system. • Device-specific access options. Tape drives, for instance, have special access options that

enable/disable hardware compression and define the density format used when writing to the tape.

Minor numbers are formulated differently for various types of devices. See the “Configuring HP-UX for Peripherals” manual for more information about formulating and interpreting major and minor numbers.

Device File Names Device file names follow a standard naming convention that makes it fairly easy to determine which device files are associated with which devices. Later slides in this chapter discuss the naming convention in detail.

7-5

H3064S A.01 © 1999 Hewlett-Packard Company


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.