HP-UX Reference (11i v3 07/02) - 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 (DSFs) and hardware paths used to access HP peripherals and
device drivers. The names of the entries are generally derived from the type of device being described
(disk, tape, terminal, and so on.), 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
Devices can be classified in two device access modes, 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.
A block-mode device, as the name implies, transfers 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
too.
Device File Naming Convention
A device special file name becomes associated with a device when the file is created, either automatically by
the special file daemon
sfd, or explicitly with the insf, mknod,or
mksf command. When creating dev-
ice special files, it is recommended that the following standard naming convention be used:
/dev/subdir/class#[options]
subdir An optional subdirectory for the device class (for example, rdisk for raw device special
files for disks, disk for block device special files for disks, rtape for raw tape devices).
class The class of device, such as
tape, disk,orlan.
# The instance number assigned by the operating system to the device. Each class of device
has its own set of instance numbers, so each combination of class and instance number
refers to exactly one device.
options Further qualifiers, such as disk partition (p
#), tape density selection for a tape device, or
surface specification for magneto-optical media.
Naming conventions for each type of device are described in their respective manpage entries.
Legacy mass storage device special files have a different naming convention that encodes the hardware
path; this is described in the Device File Types (Mass Storage Devices) section.
Hardware Paths
Hardware path information, as well as class names and instance numbers, can be derived from
ioscan
output; see ioscan(1M). There are three different types of paths to a device: legacy hardware path, lun-
path hardware path, and LUN hardware path. All three are numeric strings of hardware components,
notated sequentially from the system bus address to the device address. Each number typically represents
the location of a hardware component on the path to the device.
The legacy hardware path is composed of a series of bus-nexus addresses separated by slash (
/) characters,
leading to a host bus adapter (HBA). Beneath the HBA, additional address elements are separated by
period (
.) characters. All the elements are represented in decimal. This is the format printed by default
by the ioscan command for most devices. An example of a legacy hardware path is 0/0/2/0.1.7.0.
The lunpath hardware path is used for mass storage devices, also known as logical units (LUNs). It is
identical in format to a legacy hardware path, up to the HBA. Beneath the HBA, additional elements are
printed in hexadecimal. The leading elements representing a transport-dependent target address, and the
final element is a LUN address, which is a 64-bit representation of the LUN identifier reported by the tar-
get. This format is printed by the ioscan command when the -N option is specified. The string
0/2/1/0.0x50001fe1500170ac.0x4017000000000000
is an example of a lunpath hardware
path.
Note that the address elements beneath the HBA may not correspond to physical hardware addresses;
instead, the lunpath hardware path should be considered a handle, not a physical path to the device.
The LUN hardware path is a virtualized path that can represent multiple hardware paths to a single mass
storage device. Instead of a series of bus-nexus addresses leading to the HBA, there is a virtual bus-nexus
(known as the virtual root node) with an address of 64000. Addressing beneath that virtual root node
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 17