Solaris Devices

This is a very brief introduction into navigating the device paths in Solaris. I'm using a Solaris 10 installed on Sun v490 for all the commands shown below.

Device files in Solaris

Even though all the block and character special device files are traditionally found under /dev directory, if you look closer at your Solaris 10 setup you will notice that they're not the device files themselves, but instead are just symbolic links to device files under /devices directory.

Solaris uses /devices directory for representing all the physical hierarchy of installed devices and buses found on your hardware system.

The directory tree under /devices copies the actual physical configuration of your hardware, and looks like this:

bash-3.00# ls /devices
iscsi                              pci@8,700000:reg
iscsi:devctl                       pci@9,600000
memory-controller@0,400000         pci@9,600000:devctl
memory-controller@0,400000:mc-us3  pci@9,600000:intr
memory-controller@2,400000         pci@9,600000:reg
memory-controller@2,400000:mc-us3  pci@9,700000
options                            pci@9,700000:devctl
pci@8,600000                       pci@9,700000:intr
pci@8,600000:devctl                pci@9,700000:reg
pci@8,600000:intr                  pseudo
pci@8,600000:reg                   pseudo:devctl
pci@8,700000                       scsi_vhci
pci@8,700000:devctl                scsi_vhci:devctl
pci@8,700000:intr

Most of these names are directories, so if you cd into /devices/pseudo directory, you will see all the software (hence pseudo) devices present in your system. Other directories will refer to various elements found on the system bus, for instance you can find a directory /devices/pci@9,600000/SUNW,qlc@2/ which will represent a built-in FC-AL Host Adapter which manages hard drives on my system.

Device instance numbers

As you know, it's quite possible to have more than one device of the same kind in your system. Because of this, all the physical devices are mapped to instance numbers. Even if you have only one device of a particular kind, it will get an instance number. Numeration starts with 0.

For example, on Sun v490 there are 2 on-board gigabit network interfaces, and they're referred to as ce0 and ce1. Similarly, all other devices are numbered and mapped.

All the physical device mappings to their instances are recorded in /etc/path_to_inst file. That's the file used by Solaris to keep instance numbers persistent across reboots:

bash-3.00# more /etc/path_to_inst # #       Caution! This file contains critical kernel state
#
"/pseudo" 0 "pseudo"
"/scsi_vhci" 0 "scsi_vhci"
"/options" 0 "options"
"/pci@8,700000" 0 "pcisch"
"/pci@8,700000/ide@6" 0 "uata"
"/pci@8,700000/ide@6/sd@0,0" 1 "sd"
"/pci@8,600000" 1 "pcisch"

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
  • Benji

    Excellent, however, is there a way I can use this to list attached storage in a more user friendly manner? There appear to be a lot of naming conventions that aren't necessarily obvious (such as 'ce' for your internal gigabit nic). Is there a reference for the device naming conventions?