Home > Articles > Data > Oracle

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Instance Names

The instance name represents the kernel’s abbreviated name for every possible device on the system. A few examples of instance names are

  • sd0: The instance name for a SCSI disk
  • e1000g: The instance name for a type of network interface

Instance names are mapped to a physical device name in the /etc/path_to_inst file. The following shows the contents of a path_to_inst file:

# more /etc/path_to_inst<cr>
#
#   Caution! This file contains critical kernel state
#
#
#   Caution! This file contains critical kernel state
#
"/fcoe" 0 "fcoe"
"/iscsi" 0 "iscsi"
"/pseudo" 0 "pseudo"
"/scsi_vhci" 0 "scsi_vhci"
"/options" 0 "options"
"/pci@780" 0 "px"
"/pci@780/pci@0" 0 "pcieb"
"/pci@780/pci@0/pci@1" 1 "pcieb"
"/pci@780/pci@0/pci@1/network@0" 0 "e1000g"
"/pci@780/pci@0/pci@1/network@0,1" 1 "e1000g"
"/pci@780/pci@0/pci@2" 2 "pcieb"
"/pci@780/pci@0/pci@8" 3 "pcieb"
"/pci@780/pci@0/pci@9" 4 "pcieb"
"/pci@780/pci@0/pci@9/scsi@0" 0 "mpt"
"/pci@780/pci@0/pci@9/scsi@0/sd@0,0" 2 "sd"
"/pci@780/pci@0/pci@9/scsi@0/sd@1,0" 3 "sd"
 ... <output has been trunctated> ...

Although instance names can be displayed using the commands dmesg, sysdef, and prtconf, the only command that shows the mapping of the instance name to the physical device name is the dmesg command. For example, you can determine the mapping of an instance name to a physical device name by looking at the dmesg output, as shown in the following example from a T2000 SPARC system:

Jan 24 12:31:02 solaris genunix: [ID 936769 kern.info] sd2 is /pci@780/pci@0/pci@9/scsi@0/sd@0,0
Jan 24 12:32:03 solaris genunix: [ID 936769 kern.info] sd3 is /pci@780/pci@0/pci@9/scsi@0/sd@1,0

In the first example, sd2 is the instance name and /pci@780/pci@0/pci@9/scsi@0/sd@0,0 is the physical device name. In the second example, sd3 is the instance name and /pci@780/pci@0/pci@9/scsi@0/sd@1,0 is the physical device name. After the instance name has been assigned to a device, it remains mapped to that device. To keep instance numbers consistent across restarts, the system records them in the /etc/path_to_inst file. This file is only read at startup, and it is updated by the devfsadmd daemon described later in this section.

Devices already existing on a system are not rearranged when new devices are added, even if new devices are added to pci slots that are numerically lower than those occupied by existing devices. In other words, the /etc/path_to_inst file is appended to, not rewritten, when new devices are added.

It is generally not necessary for the system administrator to change the path_to_inst file because the system maintains it. The system administrator can, however, change the assignment of instance numbers by editing this file and doing a reconfiguration startup. However, any changes made in this file are lost if the devfsadm command is run before the system is restarted.

You can add new devices to a system without requiring a reboot. It’s all handled by the devfsadmd daemon that transparently builds the necessary configuration entries for those devices capable of notifying the kernel when the device is added (such as USB, FC-AL, disks, and so on). An example of when to use the devfsadm command would be if the system had been started but the power to the tape drive was not turned on. During startup, the system did not detect the device; therefore, its drivers were not installed.

To gain access to the device, you could halt the system, turn on power to the tape drive, and start the system back up, or you could simply turn on power to the tape drive and issue the following command at the command prompt:

# devfsadm<cr>

When used without any options, devfsadm will attempt to load every driver in the system and attach each driver to its respective device instances. You can restrict devfsadm to only look at specific devices using the -c option as follows:

# devfsadm -c tape<cr>

This restricts the devfsadm command to devices of class tape.

You can also use the devfsadm command to configure only the devices for a specific driver such as “st” by using the -i option as follows:

# devfsadm -i st<cr>

The devfsadm command will only configure the devices for the driver named “st.”

  • + Share This
  • 🔖 Save To Your Account