SCSA10-1 Objective 2.3 - Managing Solaris devices using prtconf, devfsadm

Now that we understand filesystems and disk devices, the SCSA exam expects us to be able to administer them. This objective covers the following:

Use the prtconf and format commands to list devices, explain critical issues of the /etc/path_to_inst file and reconfigure devices by performing a reconfiguration boot or using the devfsadm command for SPARC, x64, and x86-based systems.

The prtconf command displays information about the system and peripheral devices (like disk and tape drives, mice, USB stuff, etc.). The basic use of prtconf is covered here. This command is the quickest way to find out how much memory a system has, although it doesn’t give any detail. If you are feeling adventurous, add the -v (verbose) option to the end of the command.

The format command is used to layout slices (like partitions) on hard drives or logical disk volumes. It is also a useful tool for determining what drives a system can see and how they are configured into slices. Running the command ‘format’ as root will present a list of disks available on the system, indexed by integer starting at 0. For example, you might see this output:

AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@1c,600000/scsi@2/sd@0,0
1. c1t1d0

/pci@1c,600000/scsi@2/sd@1,0
Specify disk (enter its number):

In this case, two disks (c1t0d0 and c1t1d0) are attached to the system and visisble to the OS. Also in this output is specific drive information (36GB, so many cylinders, heads, sectors) and the path to the device (for example, the path to c1t0d0 is /devices/pci@1c,600000/scsi@2/sd@0,0).

Selecting a disk from this menu in the format command (for example typing 0) will take you to the format menu which has several utilities for disk management like surface analysis, defect management, and label maintenance. Using the command ‘partition’ from this menu (I abbreviate it ‘part’) brings up the partition menu which allows the partition table (slices) to be modified or viewed. For this objective, knowing that the ‘print’ command will display the partition table of the current disk is enough. Here is sample print output:

Part Tag Flag Cylinders Size Blocks
0 swap wu 0 - 1023 4.00GB (1024/0/0) 8388608
1 root wm 1024 - 1535 2.00GB (512/0/0) 4194304
2 backup wm 0 - 34990 136.68GB (34991/0/0) 286646272
3 usr wm 1536 - 2559 4.00GB (1024/0/0) 8388608
4 unassigned wm 2560 - 4095 6.00GB (1536/0/0) 12582912
5 unassigned wm 4096 - 5119 4.00GB (1024/0/0) 8388608
6 unassigned wm 0 0 (0/0/0) 0
7 var wm 5120 - 34990 116.68GB (29871/0/0) 244703232

The only other thing to know right now about format is how to get out. From this point, type ‘quit’ twice.

Instance names (logical names, like c0t0d0s0) are mapped to physical names (/pci@1c,600000/scsi@2/sd@0,0) in /etc/path_to_inst which makes this a very important file. Corruption of this file can cause plague or prevent the system from booting. The important thing to know about path_to_inst is that when adding hardware to a Sun box that could change the order of physical names (like adding another PCI bus or disk controller) this mapping could change this mapping which would mean c0t0d0s0 would point elsewhere.

A reconfiguration boot causes Solaris to rebuild the /etc/path_to_inst file. When adding disks or other devices to a Sun system, this is the easiest way to get Solaris to acknowledge them.

An alternative to a reconfiguration boot is the use of the devfsadm command. This command manages the /dev and /devices directory trees and the path_to_inst file.

Comments are closed.