Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Configuring HP-UX for Peripherals: HP 9000 > Chapter 1 Getting Started

Understanding Device Special File Names

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Device special files tell the operating system which device driver to use, how to find the peripheral device, and what characteristics the peripheral device should employ. Characteristics vary by device. Thus, device special files for magneto-optical devices show the surface being addressed, while those for tape drives show rewind and density.

Most device special file names contain the location of the device on the bus architecture. To see this, display the files in any subdirectory of the /dev directory. Note, all mass storage devices adhere to a syntax that includes c#t#d#[s#] (other kinds of device files use a related convention):

Title not available (Understanding Device Special File Names )

c#

represents the card instance number for the class of interface card to which the device is connected. Classes of interface cards include ext_bus, graphics, tty, lan, and others. The card instance of an interface card is unique for its specific class. There is no relationship between the instance number and the slot number of the interface card in the card cage.

Class and instance number can be seen in the first two columns of /usr/sbin/ioscan -f output. When interpreting a device special file, the only significant instance number is the card instance (that is, the instance number for the class of interface to which a device is attached). Thus, in a sample disk device file /dev/rdsk/c1t4d0, the c1 refers to the card instance, not to an LU number (as in previous releases).

t#

represents the target address of the device on the interface bus, and can range from 0 to 7 maximum. Typically t# is the address set with jumpers or dip switches on the device itself.

d#

represents the device number, and can range from 0 to 7 maximum. On SCSI devices, d# is the SCSI LUN; on HP-FL and HP-IB, it is the unit number. Except for multi-function devices, d# is typically d0.

s#

specifies section number (optional; made available for backward compatibility). Note, section 0 now represents the entire disk, while section 2 represents a small disk section (previously section 0). If the s# is not shown, the device special file refers to the entire disk.

Sample Device Special File Names

Every peripheral-specific chapter in this book has tables of configuration requirements that show the default device special file names for that class of device. Here are some sample device special files and their possible meanings:

/dev/rdsk/c0t6d0

Entire disk accessed in character (raw) mode through SCSI card instance 0, target 6, LUN 0.

/dev/dsk/c3t2d4

Entire disk accessed in block mode through HP-FL card instance 3, address 2, Unit 4.

/dev/rac/c0t0d0_11a

Surface 11a of a magneto-optical disk whose autochanger in a disk library accessed in raw mode through card instance 0, target 0, LUN 0.

/dev/rmt/c1t0d0BESTnb

Tape drive accessed through card instance 1, target 0, LUN 0. Tape writes at best available density/format, no rewind, Berkeley-style close.

/dev/rmt/0mnb

Tape drive device special file with identical characteristics (linked) to /dev/rmt/c1t0d0BESTnb.

/dev/floppy/c1t3d0

Entire floppy disk drive accessed in block mode through SCSI card instance 1 located in slot 13, with target 3, LUN 0.

/dev/tty0p0

Serial port of built-in card instance 0 port 0, hardwired at address 56.0; accessed through driver mux4.

/dev/c1t0d0_lp

Parallel port on core I/O card 1, set to handshake mode 2.

/dev/lp

Parallel port on core I/O card 1, set to handshake mode 2; device file is linked to /dev/c1t0d0_lp.

Both lssf and ioscan commands display the interface to which a device is connected. These are discussed in the next sections.

Decoding Device Special Files with lssf

Use the /usr/sbin/lssf command to decode device special files. The following figure compares ll and lssf output.

NOTE: Throughout this manual, examples of commands usage are shown as bold text.
ll /dev/rdsk/c11t2d0
crw-r----- 1 bin bin 175 0x0b2000 Mar 25 15:46 /dev/rdsk/c11t2d0
/usr/sbin/lssf /dev/rdsk/c11t2d0
disc2 card instance 11 HPFL address 2 unit 0 section 0
at address 6/8.4.2 /dev/rdsk/c11t2d0

ll /dev/rct/c0t3d1
crw-r----- 1 bin bin 214 0x003140 Mar 25 12:41 /dev/rct/c0t3d1
/usr/sbin/lssf /dev/rct/c0t3d1
disc1 card instance 0 HPIB address 3 unit 1 cartridge tape section 0
at address 2/4.0.3 /dev/rct/c0t3d1

ll /dev/rmt/c0t1d0NOMOD
crw-rw--rw-- 1 bin bin 205 0x00100f May 4 11:31 /dev/rmt/c0t1d0NOMOD
/usr/sbin/lssf /dev/rmt/c0t1d0NOMOD
stape card instance 0 SCSI target 1 SCSI LUN 0 at&t keep existing density/format
at address 2/0/1.1.0 /dev/rmt/c0t1d0NOMOD

ll /dev/rmt/c0t1d0BESTb
crw-rw--rw-- 2 bin bin 205 0x001080 Apr 28 17:24 /dev/rmt/c0t1d0BESTb
/usr/sbin/lssf /dev/rmt/c0t1d0BESTb
stape card instance 0 SCSI target 1 SCSI LUN 0 berkeley best density available
at address 2/0/1.1.0 /dev/rmt/c0t1d0BESTb

ll /dev/rac/c1t1d0_2a
crw-r--r-- 1 root users 230 0x011003 May 3 16:46 /dev/rac/c1t1d0_2a
/usr/sbin/lssf /dev/rac/c1t1d0_2a
autox0 card instance 1 SCSI target 1 SCSI LUN 0 optical disk 2 side a
at address 52.1.0 /dev/rac/c1t1d0_2a214
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1995, Hewlett-Packard Development Company, L.P.