Contained Within
Find More Documentation
Featured Support Resources
| Descargar este libro en PDF
Accessing Devices on a SPARC System
1
- This chapter describes the following topics:
-
- Device naming conventions
- Accessing disk and tape devices
- Accessing CD-ROM devices
Overview
- This chapter describes the device naming conventions used when accessing peripheral devices such as CD-ROM devices, disks, and tapes.
- If you are already familiar with the Solaris 2.x device naming conventions, use the following table to proceed directly to the task-oriented chapters.
-
SPARC Device Naming Conventions in the Solaris 2.x Environment
- Device naming conventions in the Solaris 2.x environment are based on logical, not physical, names.
-
- A physical device name is derived from how a device is connected to the system at boot time.
- Logical device names represent the physical devices and are used to access devices when using administration commands.
- The device files representing the physical devices names are stored in the /devices directory with a symbolic link to the logical device names in the /dev directory.
- The next subsections provide reference material for the various administrative tasks involving disks, tapes, and diskettes described in future chapters of this book and in other books.
- SPARC Accessing Disk Devices
- Many administration commands take arguments that refer to a particular disk or disk slice.
- As shown below, you refer to a disk device by specifying the subdirectory to which it is symbolically linked (either /dev/dsk or /dev/rdsk), followed by a string identifying the particular controller, disk, and slice.
-

- SPARC Specifying the Disk Subdirectory
- Disk and file administration commands require the use of either a raw (or character) device interface, or a block device interface. The distinction is made by how data is read from the device.
- Raw device interfaces transfer only small amounts of data at a time. Block device interfaces include a buffer from which large blocks of data are read at once.
- Different commands require different interfaces.
-
- When a command requires the raw device interface, specify the subdirectory /dev/rdsk. (The "r" in rdsk stands for "raw.")
- When a command requires the block device interface, specify the subdirectory /dev/dsk.
- When you're not sure whether a command requires use of /dev/dsk or /dev/rdsk, check the reference man page for that command.
-
Table 1-1 shows which interface is required for a few commonly used disk and file-system commands.
-
Table 1-1
| Command | Interface Type | Example of Use |
| df | Block | df /dev/dsk/c0t3d0s6 |
| fsck | Raw | fsck -p /dev/rdsk/c0t0d0s0 |
| mount | Block | mount /dev/dsk/c1t0d0s7 /export/home/ziggy |
| newfs | Raw | newfs /dev/rdsk/c0t0d1s1 |
| prtvtoc | Raw | prtvtoc /dev/rdsk/c0t0d0s2 |
- SPARC Specifying the Slice
- The string you use to identify a specific slice on a specific disk depends on the controller type, either direct (Xylogics(R)) or bus-oriented (SCSI or IPI). The conventions for both types of controllers are explained in the following subsections.
-
Disks With Direct Controllers To specify a slice on a disk with a direct controller, follow the naming convention shown in the figure below.

Figure 1-1
- To indicate the whole disk, specify slice 2 (s2).
- If you have only one controller on your system, x will always be 0.
-
SPARC - Controller numbers are assigned automatically at system initialization. The numbers are strictly logical and imply no direct mapping to physical controllers.
-
Disks With Bus-Oriented Controllers To specify a slice on a disk with a bus-oriented controller (SCSI, for instance), follow the naming convention shown in the figure below.

Figure 1-2
- If you have only one controller on your system, w will always be 0.
- For SCSI controllers, x is the target address as set by the switch on the back of the unit, and y is the logical unit number (LUN) of the drive attached to the target. If the disk has an embedded controller, y is usually 0.
- To indicate the whole disk, specify slice 2 (s2).
-
SPARC - Controller numbers are assigned automatically at system initialization. The numbers are strictly logical and imply no direct mapping to physical controllers.
- SPARC Accessing Tape Devices
- Logical tape device files are found in the /dev/rmt/* directory as symbolic links from the /devices directory.
-

- The first tape device connected to the system is 0 (/dev/rmt/0), which may be (R) one of the following types: QIC-11, QIC-24, QIC-150, or Exabyte .
- See File System Administration for more information about accessing tape devices.
SPARC Identifying Disk Devices on Your System
- If you can't identify the type of disks connected to a system based on the order in which they were added to the system, use the following commands to discover the disk types.
- Use the ls -l command to associate a logical device name with its physical device name:
-
# ls -l /dev/dsk/c0t1d0s0
lrwxrwxrwx 1 root root 51 Nov 15 15:21
/dev/dsk/c0t1d0s0 ->
../../devices/sbus@1,f8000000/esp@0,800000/sd@1,0:a
#
|
- In the above example, disk 0 (target 1) is connected to the first SCSI host adapter (esp@0...), which is connected to the first SBus device (sbus@1...).
- Use the format utility to identify the disks that are recognized on the system. The format output associates both the physical and logical device name to the disk's marketing name which appears in brackets <>. This is an easy way to identify which logical device names represent the disks connected to your system.
-
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t1d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/sbus@1,f8000000/esp@0,800000/sd@1,0
1. c0t3d0 <SUN0207 cyl 1254 alt 2 hd 9 sec 36>
/sbus@1,f8000000/esp@0,800000/sd@3,0
Specify disk (enter its number):
|
- See Peripherals Administration for information on using the format utility.
|
|