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.



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:

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:


SCSI Subsystem

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.

FIGURE 2-1 SCSI Subsystem Connections



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.

SCSI Controller

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.

SCSI Address Selection Schemes

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.

Addresses and Device Names

The Solaris software identifies a peripheral through a series of addresses and device names:

Target ID Addressing Methods

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:

Determining the correct target ID for your device depends on several conditions:

Physical Device Names

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).

Disk example:

CD-ROM example:

Tape example:

Logical Device Names

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 Disk Drives

Logical device names for a disk drive are created as follows:

/dev/[r]dsk/cntndnsn

Where:

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:

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.

Logical Device Names for CD-ROM Drives

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:

/dev/rdsk/cnt6dnsn

Logical Device Names for Tape Drives

The following is an example of a SCSI tape logical device name:

/dev/rmt/0

TABLE 2-2 Tape Drive Logical Device Names

Tape Drive

Target ID

Primary Logical Device Name

Additional Logical Device Names

First tape drive

4

/dev/rmt/0

/dev/rmt/0l

/dev/rmt/0m

/dev/rmt/0h

/dev/rmt/0u

Second tape drive

5

/dev/rmt/1

/dev/rmt/1l

/dev/rmt/1m

/dev/rmt/1h

/dev/rmt/1u


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:

Valid tape name combinations are shown in the table below. If you are working with the second tape drive, use 1 instead of 0 .

0l  
0b  
0bn
0c  
0cb  
0cbn  
0cn
0h  
0hb  
0hbn   
0hbn
0m  
0mb  
0mbn  
0mn
0l  
0lb  
0lbn  
0ln
0u  
0ub  
0ubn  
0un