HP-UX System Administrator's Guide: Overview HP-UX 11i v3 (B3921-90011, September 2010)

The Anatomy of a Device Special File
Device Special Files (DSFs) are comprised of the following parts:
file name
This is the name of the file that appears in the /dev directory tree
major number A number used to identify which driver to use to communicate with the
device/LUN associated with that device special file
The major number is an index for the device driver into one of two kernel
tables — bdevsw, the block device switch table and cdevsw, the character
device switch table.
Drivers that support both block and character I/O (such as SCSI disk driver
and optical autochanger) have both a block major number and a character
major number. Devices that support only character-mode access have only
a character major number.
minor number A number that identifies the hardware location and sometimes
driver-dependent characteristics (usually organized by bit assignments).
The three parts of a device file can be viewed using the ll (ls -l) command. For example:
Figure 3-3 Device Special File Components
$ ll /dev/dsk /dev/rdsk /dev/disk /dev/rdisk
/dev/disk:
total 0
brw-r----- 1 bin sys 1 0x000000 Aug 10 16:26 disk2
brw-r----- 1 bin sys 1 0x000001 Aug 10 16:26 disk3
brw-r----- 1 bin sys 1 0x000002 Sep 20 17:27 disk4
brw-r----- 1 bin sys 1 0x000003 Sep 20 17:27 disk5
/dev/dsk:
total 0
brw-r----- 1 bin sys 31 0x006000 Aug 10 16:26 c0t6d0
brw-r----- 1 bin sys 31 0x026000 Aug 10 16:26 c2t6d0
/dev/rdisk:
total 0
crw-r----- 1 bin sys 11 0x000000 Aug 10 16:26 disk2
crw-r----- 1 bin sys 11 0x000001 Sep 20 16:03 disk3
crw-r----- 1 bin sys 11 0x000002 Sep 20 17:27 disk4
crw-r----- 1 bin sys 11 0x000003 Sep 20 17:27 disk5
/dev/rdsk:
total 0
crw-r----- 1 bin sys 188 0x006000 Aug 10 16:26 c0t6d0
crw-r----- 1 bin sys 188 0x026000 Aug 10 16:26 c2t6d0
b = block device special file c= character device special file
File Name
Minor Number
Major Number
You can view, in more human readable form, information contained in the device special file
using the /usr/sbin/lssf command. For example:
# /usr/sbin/lssf /dev/rdsk/*
sdisk card instance 0 SCSI target 6 SCSI LUN 0 section 0 at address 0/0/0/2/0.6.0
/dev/rdsk/c0t6d0sdisk card instance 2 SCSI target 6 SCSI LUN 0 section 0 at
address 0/0/0/3/0.6.0 /dev/rdsk/c2t6d0
# /usr/sbin/lssf /dev/disk/*
esdisk section 0 at address 64000/0xfa00/0x0 /dev/disk/disk2 esdisk section 0 at
address 64000/0xfa00/0x1 /dev/disk/disk3
The /usr/sbin/ioscan command will also show you hardware path information about the
devices on your system.
Here is the legacy view of the disk drives on a system:
# /usr/sbin/ioscan -C disk
H/W Path Class Description
=====================================================
0/0/0/2/0.6.0 disk HP 36.4GMAN3367MC
0/0/0/3/0.6.0 disk HP 36.4GMAN3367MC
Here is the agile view of the same disk drives (showing the virtual LUN hardware paths rather
than the actual hardware paths):
# /usr/sbin/ioscan -N -C disk
H/W Path Class Description
Storage on HP-UX 53