Solaris Handbook for Sun Peripherals
只搜寻这本书
查看这本书:
以 PDF 格式下载本书 (857 KB)

Appendix A 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 the type of peripheral subsystem that you have.

This chapter describes addressing concepts for the SCSI peripheral subsystem.

SCSI Subsystem

To understand how to address and access a SCSI device you need to understand how the device is connected to the system. The following section describes how SCSI systems are connected to a system.

The following block diagram represents a typical SCSI subsystem and how it is connected to the system.图形

  • CPU - is the central processing unit of the system.

  • System I/O Bus - is 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 "SCSI Controller"" below.

  • SCSI Bus - is the path from the SCSI controller to the Device interface.

  • Device Interface - interprets the electrical signals between the SCSI bus and the device. It is usually built in to the device unit.

  • Device Unit - is the actual peripheral such as a disk, tape, or CD-ROM device. A Device unit with a built-in interface makes up the whole peripheral.

  • Device Driver - (not shown) is 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 refered to as SCSI host) is provided in two ways; as circuitry built-in to 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 do 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 in to. See Chapter 5, Setting Up an Option Card" for more information.

SCSI Address Selection Schemes

To configure disk, tape, and CD-ROM drives you need to 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 address - an address that is set on the interface of the device by you, or the installer.

  • Physical device name - is assigned by the system firmware based on its physical connection to the system.

  • Logical device name - is assigned by the operating system when the peripheral is installed.

Target ID Addressing Methods

The target ID is an address that is 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 on a single connector. A device of this sort will automatically become addressed when you install it. This is the most common method of addressing Sun disk drives today.

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

  • The target addressing method (described above) used by your device.

  • Existing addresses on the interface - All devices must have a unique target ID.

  • Device type - some device types such as CD-ROM and tape drives are most easily identified by the operating system when they are with certain addresses. See the table below:

Table A-1 SCSI Target Addresses
Device OrderCD-ROM TargetsTape TargetDisk Target (Ultra & Enterprise Systems)Disk Target (Pre-Ultra systems)
1st6403
2nd511
3rd22
4th30
5th44
6th55
7th66


Note -

Some SCSI controllers support 7 devices, others support up to 15 devices (although you should take into account the effect on I/O). If 15 devices are connected, valid disk target IDs are 0-14.



Note -

You can not have two devices with the same Target ID on the same SCSI controller. However, target IDs can be reused across different SCSI controllers.


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 (boot -r or when /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 that you use when you work with the device.

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

/dev/[r]dsk/cntndnsn

  • cn - is 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.

  • tn - is the target ID of the device such as t0, t1, t2, t3 and so on.

  • dn - is 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 - is 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, they 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 one 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 just 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, there are three commands that require a block device: mount, umount, and df. Most other commands function best when you use the raw device. When you're 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 above). The following is an example of a CD-ROM logical device name:

/dev/rdsk/cnt6dnsn

SCSI tape logical device name example:

/dev/rmt/0

Table A-2 Tape Drive Logical Device Names
Tape DriveTarget IDPrimary Logical Device NameAdditional Logical Device Names
First tape drive4/dev/rmt/0/dev/rmt/0n    /dev/rmt/0h    /dev/rmt/0c    /dev/rmt/0ubn
Second tape drive5/dev/rmt/1/dev/rmt/1n    /dev/rmt/1h    /dev/rmt/1c    /dev/rmt/1ubn

For most tape operations you should use the primary logical device name because the tape drive will use its optimum default characteristics. However, if you desire to specify a particular tape drive behavior, append a letter (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, c is compressed, and u is ultra. Not all tape drives support all densities. If you are in doubt, do not specify a density. The tape drive should default to the optimum setting.

    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.

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

0n   0b 0bn0c   0cb   0cbn   0cn0h 0hb 0hbn 0hbn0m   0mb   0mbn 0mn0l   0lb   0lbn   0ln0u   0ub   0ubn   0un