Instance Name

The instance name represents the kernel’s abbreviated name for every possible device on the system. For example, on an Ultra system, dad0 represents the instance name of the IDE disk drive, and hme0 is the instance name for the 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 
# 
#       Caution! This file contains critical kernel state 
"/pci@1f,0" 0 "pci" 
"/pci@1f,0/pci@1,1" 0 "simba" 
"/pci@1f,0/pci@1,1/ide@3" 0 "uata" 
"/pci@1f,0/pci@1,1/ide@3/sd@2,0" 2 "sd" 
"/pci@1f,0/pci@1,1/ide@3/dad@0,0" 0 "dad" 
"/pci@1f,0/pci@1,1/ebus@1" 0 "ebus" 
"/pci@1f,0/pci@1,1/ebus@1/fdthree@14,3023f0" 0 "fd" 
"/pci@1f,0/pci@1,1/ebus@1/su@14,3062f8" 1 "su" 
"/pci@1f,0/pci@1,1/ebus@1/se@14,400000" 0 "se" 
"/pci@1f,0/pci@1,1/ebus@1/su@14,3083f8" 0 "su" 
"/pci@1f,0/pci@1,1/ebus@1/ecpp@14,3043bc" 0 "ecpp" 
"/pci@1f,0/pci@1,1/ebus@1/SUNW,CS4231@14,200000" 0 "audiocs" 
"/pci@1f,0/pci@1,1/ebus@1/power@14,724000" 0 "power" 
"/pci@1f,0/pci@1,1/network@1,1" 0 "hme" 
"/pci@1f,0/pci@1,1/SUNW,m64B@2" 0 "m64" 
"/pci@1f,0/pci@1" 1 "simba" 
"/pci@1f,0/pci@1/pci@1" 0 "pci_pci" 
"/pci@1f,0/pci@1/pci@1/SUNW,qfe@1,1" 1 "qfe" 
"/pci@1f,0/pci@1/pci@1/SUNW,qfe@0,1" 0 "qfe" 
"/pci@1f,0/pci@1/pci@1/SUNW,qfe@3,1" 3 "qfe" 
"/pci@1f,0/pci@1/pci@1/SUNW,qfe@2,1" 2 "qfe" 
"/options" 0 "options" 
"/pseudo" 0 "pseudo" 
# 

Instance names can also be displayed by using the commands dmesg, sysdef, and prtconf, which were described earlier. 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 an Ultra system:

dad0 at pci1095,6460 target 0 lun 0 
dad0 is /pci@1f,0/pci@1,1/ide@3/dad@0,0 

If you have an older SPARCstation with an SBus and SCSI disk drives, here’s similar output for a SCSI disk drive:

sd3 at esp0: target 3 lun 0 
sd3 is /iommu@f,e0000000/sbus@f,e0001000,espdma@f,400000/esp@f,800000/sd@3,0 

In the first example, dad0 is the instance name and /pci@1f,0/pci@1,1/ide@3/ dad@0,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 read-only 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 sbus 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.

Caution

Do not remove the path_to_inst file; the system cannot start up without it. The system relies on information found in this file to find the root, usr, and swap devices. Make changes to this file only after careful consideration.


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.

Note

If you can’t start up from the startup disk because of a problem with the /etc/path_to_inst file, you should start up from the CD-ROM (boot -sw cdrom) and copy the /etc/path_to_inst file contained on the CD-ROM to the /etc/path_to_inst on the startup disk. To do this, start up from the CD-ROM using boot -sw cdrom at the OpenBoot prompt. Then mount the root file system from the startup disk on /a. Copy the /etc/path_to_inst file to /a/etc/path_to_inst. If you still can’t start up, the problem is deeper than just with the /etc/path_to_inst file.


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. Before Solaris 7, release 11/99, you needed to run several devfs administration tools such as drvconfig, disks, tapes, ports, and devlinks to add in the new device and create the /dev and /devices entries necessary for the Solaris operating environment to access the new device. These tools are still available but only for compatibility purposes; drvconfig and the other link generators are symbolic links to the devfsadm utility. Furthermore, these older commands are not aware of hot-pluggable devices, nor are they flexible enough for devices with multiple instances. The devfsadm command should now be used in place of all these commands; however, devfsadmd, the devfsadm daemon, automatically detects device configuration changes, so there should be no need to run this command interactively.

Note

Two terms that are often interchanged (and confused) are hot-pluggable and hot-swappable. Hot-pluggable allows the connection and disconnection of peripherals or other components without rebooting the operating system. Dynamic reconfiguration, available on certain SPARC servers, enables a service provider to remove and replace hot-pluggable system I/O boards in a running system, eliminating the time lost in rebooting. Also if a replacement board is not immediately available, the system administrator can use dynamic reconfiguration to shut down a failing board while allowing the system to continue operation. Hot-swappable allows the connection and disconnection of peripherals or other components without shutting down the hardware, but it usually requires a system reboot.


An example of when to use the devfsadm command would be if the system had been started but the power to the CD-ROM or tape drive was not turned on. During startup, the system did not detect the device; therefore, its drivers were not installed. This can be verified by issuing the sysdef command and examining the output for sd6, the SCSI target ID normally used for the external CD-ROM:

sd, instance #6 (driver not attached) 

To gain access to the CD-ROM, you could halt the system, turn on power to the CD-ROM, and start the system backup, or you could simply turn on power to the CD-ROM and issue the following command at the command prompt:

devfsadm 

Now, if you issue the sysdef command, you’ll see the following output for the CD-ROM:

sd, instance #6 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset