C H A P T E R 2 |
Overview of SCSI Addressing |
Achieving the appropriate peripheral address depends on the type of peripheral subsystem that you have. Sun systems support a variety of peripheral subsystems such as:
SCSI - small computer system interface (covered in this appendix)
IDE - integrated drive electronics
SOC - serial optical controller
IPI - intelligent peripheral interface
Refer to the documentation that accompanies your hardware to determine your system's type of peripheral subsystem.
This chapter describes addressing concepts for the SCSI peripheral subsystem, including:
To understand how to address and access a SCSI device, you must understand how the device is connected to the system. The following section describes how SCSI subsystems are connected to a system.
The following block diagram represents a typical SCSI subsystem and how it is connected to the system.
System I/O bus - inherent to the design of the system. You might have a system with a PCI, SBus, VME, or combination of these.
SCSI controller - interprets the electrical signals between the system I/O bus and the SCSI bus. For more information, refer to the section SCSI Controller .
Device interface - interprets the electrical signals between the SCSI bus and the device. It is usually built into the device unit.
Device unit - the actual peripheral such as a disk, tape, CD-ROM, or DVD-ROM device. A device unit with a built-in interface makes up the whole peripheral.
Note - Also required is a device driver (not shown here), which is the software that enables the operating system to communicate with the device. |
The combination of SCSI controller, SCSI bus, device interface and device unit make up the peripheral subsystem . All of these entities must be designed and configured to work together.
A SCSI controller (sometimes referred to as a SCSI host ) is provided in two ways: as circuitry built into the main logic board (CPU board), often referred to as an "onboard" interface; or added to a system by way of a card plugged into the system I/O bus.
If you are adding a SCSI controller card to a system, you must add a card that corresponds to your type of system I/O bus.
Typically, your sales representative provides you with the right interface card to fit the system I/O bus and the type of interface that the peripheral device requires. Many systems have built-in SCSI support, and you would not need to install any additional cards.
If you need to install a SCSI controller card, and it is either an SBus card or a PCI card, the card will be logically addressed automatically based on the order and connector that it is plugged into.
To configure disk, tape, and CD-ROM drives, you must understand the address selection scheme that your system uses. Address selection schemes for disk drives differ from address selection schemes for tape drives. This section discusses the SCSI address selection schemes for different types of peripheral devices.
The Solaris software identifies a peripheral through a series of addresses and device names:
Target ID address - an address that is set on the interface of the device by you or by the installer.
Physical device name - assigned by the system firmware based on its physical connection to the system.
The target ID is an address set on the interface of the device (disk, tape, or CD-ROM). There are three methods to set this address:
Jumpers - an address is achieved by placing jumpers on shunts. This is how internal CD-ROM devices are addressed. If your device requires jumper installation, consult the documentation that shipped with your device.
Switch - used when a device is in an external enclosure (an enclosure other than the system chassis). The enclosure provides a switch that you set to your desired target ID address.
Single-connector - a device with a single connector receives data, power, and address information through the same connector. This sort of device is automatically addressed when you install it. This is the most common method of addressing Sun disk drives.
Determining the correct target ID for your device depends on several conditions:
Device type - some device types, such as CD-ROM and tape drives, are most easily identified by the operating system when they use certain addresses. See the table below:
Note Note - You cannot have two devices with the same Target ID on the same SCSI controller. However, target IDs can be reused across different SCSI controllers. |
The physical device name is assigned by the system firmware. This name is expressed in the form of a path name. The path name describes the location of the device in relation to the CPU. For SCSI devices, the target ID is part of this address name.
After the firmware assigns the physical device names, special files are copied to the /devices directory that reflect the physical device names. This occurs when the system is booted with the reconfiguration option (when you type boot -r or when a /reconfigure file exists and the system is booted).
The logical device name is created by the operating system when the peripheral is first installed and booted with the reconfiguration option. Logical device names are located in the /dev directory. A logical device name is a file that is symbolically linked to the physical device name (names in the / devices directory). The file name reflects the address and physical connection of the device to the system. The logical device name is the address you use when you work with the device.
Logical device names for a disk drive are created as follows:
c n - the controller (or interface) number, such as c0 , c1, c2 , and so on. Controller numbers are logically assigned in sequential order. c0 often represents a built-in SCSI controller.
d n - the device number (often called a LUN). It reflects the actual address of the device unit. This is usually d0 for most SCSI disks because there is only one disk attached to the target controller (device interface).
s n - the slice number that represents a partition, or slice , of a disk. Valid numbers are 0 through 7 .
Logical device names for disk drives are created in two subdirectories in the /dev directory; rdsk and dsk . As you use disk logical device names with various commands, you must use the appropriate name from either /dev/rdsk or /dev/dsk , depending on whether the command uses a raw (or character) device interface or a block device interface. The distinction is made based on how data is read from the device:
Raw device interface - A raw device transfers data character by character in the exact amount of data needed for a given task. Use the logical device name from the /dev/rdsk directory.
Block device interface - A block device transfers data in a predetermined amount, often from a buffer from which large blocks of data are read at once. Use the logical device name from the /dev/dsk directory
In general, three commands require a block device:
Most other commands function best when you use the raw device. When you are not sure whether a command requires use of /dev/dsk or /dev/rdsk , check the man page for that command.CD-ROM logical device names are created following the same scheme as disk drives (see Logical Device Names for Disk Drives ). The following is an example of a CD-ROM logical device name:
The following is an example of a SCSI tape logical device name:
For most tape operations, use the primary logical device name, because the tape drive will use its optimum default characteristics. However, if you want to specify a particular tape drive behavior, append up to three letters to the appropriate logical device name as follows:
Append a letter to the drive number to specify a tape density where h is high, m is medium, l is low, and u is ultra. Not all tape drives support all densities. If you are in doubt, specify the highest density.
Append a b to the drive number to specify BSD behavior . This means that when reading past an end-of-file mark, it returns the first record of the next file. This is desirable if the tape is going to be read on a BSD UNIX® system.
Append an n to the drive number to specify no rewind operation. Otherwise, the tape will rewind when the tape operation is complete.
Append a c to specify compression mode. For some drives, the compression mode is incorporated in some of the data density codes and adding the c is redundant.
Valid tape name combinations are shown in the table below. If you are working with the second tape drive, use 1 instead of 0 .
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.