Device Driver Tutorial

Device Names

This section shows a complex device name and explains the meaning of each part of the name in /dev and also in /devices. The following example is the name of a disk slice:


/dev/dsk/c0t0d0s7 -> ../../devices/pci@1c,600000/scsi@2/sd@0,0:h

First, examine the name of the file in the /dev directory. These names are managed by the devfsadmd(1M) daemon.

c0

Controller 0

t0

Target 0. On SCSI controllers, this value is the disk number.

d0

SCSI LUN. This value indicates a virtual partitioning of a target or single physical device.

s7

Slice 7 on the target 0 disk.

For the same device, compare the name of the file in the /devices directory. These names show the physical structure and real device names. Note that some of the components of the device name in the /devices directory are subdirectories.

pci@1c,600000

PCI bus at address 1c,600000. These addresses are meaningful only to the parent device.

scsi@2

SCSI controller at address 2 on the PCI bus at address 1c,600000. This name corresponds to the c0 in /dev/dsk/c0t0d0s7.

sd@0,0

SCSI disk at address 0,0 on the SCSI controller at address 2. This name represents target 0, LUN 0 and corresponds to the t0d0 in /dev/dsk/c0t0d0s7. The sd name and driver can also apply to IDE CD-ROM devices.

sd@0,0:h

Minor node h on the SCSI disk at address 0,0. This name corresponds to the s7 in /dev/dsk/c0t0d0s7.