disk.7 (2010 09)

d
disk(7) disk(7)
NAME
disk - direct disk access
DESCRIPTION
This entry describes the actions of HP-UX disk drivers when referring to a disk as either a block-special
or character-special (raw) device.
Device File Naming Conventions
Standard disk device files are named according to the following conventions (see intro (7)):
Block-mode Devices
/dev/disk/disk
N[_pX]
Character-mode Devices
/dev/rdisk/disk
N[_pX]
Legacy block-mode Devices
/dev/dsk/cxtyd
n[sm]
Legacy character-mode Devices
/dev/rdsk/cxtydn[sm]
Legacy device special filenames are those used on HP-UX 11i Version 2 and earlier releases. They can
still be used for backward compatibility, but only for part of the configuration within the limits of HP-UX
11i Version 2.
The component parts of the device filename are constructed as follows:
N Required. A decimal number corresponding to the instance number assigned to the direct
access device by the operating system.
X Required if
_p is specified. A decimal number corresponding to a partition number.
c Required. Identifies the following hexadecimal digits as the "Instance" of the interface card.
x Hexadecimal number identifying controlling bus interface, also known as the "Instance" of this
interface card. The instance value is displayed in the ioscan (1M) output, column "I" for the
H/W Type, "INTERFACE".
Required.
t Identifies the following hexadecimal digits as a "drive number" or "target".
Required.
y Hexadecimal number identifying the drive or target number (bus address).
Required.
d Identifies the following hexadecimal digits as a "unit number".
Required.
n Hexadecimal unit number within the device.
Required.
s Optional. Defaults to that corresponding to whole disk. Identifies the following value as a
"section number".
m Required if
s is specified. Defaults to section 0 (zero), whole disk. Drive section number.
Assignment of controller, drive, logical unit and section numbers is described in the system administrator
manuals for your system.
Block-special access
Block-special device files access disks via the system’s block buffer cache mechanism. Buffering is done in
such a way that concurrent access through multiple opens and mounting the same physical device is
correctly handled to avoid operation sequencing errors. The block buffer cache permits the system to do
physical I/O operations when convenient. This means that physical write operations may occur substan-
tially later in time than their corresponding logical write requests. This also means that physical read
operations may occur substantially earlier in time than their corresponding logical read requests.
Block-special files can be read and written without regard to physical disk records. Block-special file
read() and write() calls requiring disk access result in one or more BLKDEV_IOSIZE byte (typically
2048 byte) transfers between the disk and the block buffer cache. Applications using the block-special
device should ensure that they do not read or write past the end of last BLKDEV_IOSIZE sized block in
the device file. Because the interface is buffered, accesses past this point behave unpredictably.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)