|C H A P T E R 2|
Overview of SCSI Addressing
Note - More information about SCSI addressing and subsystems can be found in the System Administration Guide: Basic Administration and in the scsi_address(9S) manpage in the Solaris 9 Reference Manual Collection.
SCSI - small computer system interface (covered in this appendix)
IDE - integrated drive electronics
SOC - serial optical controller
IPI - intelligent peripheral interface
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.
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.
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.
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.
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.
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:
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.
cn - 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.
dn - 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).
sn - the slice number that represents a partition, or slice, of a disk. Valid numbers are 0 through 7.
Note - Do not apply the above explanation to disks that are part of a SPARCstorage Array (a device connected to a SOC card). Disks in a SPARCstorage Array have logical device names with the same /dev/[r]dsk/cntndnsn; however, the names are interpreted differently.
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
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:
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.