AIX Ver. 4 SysAdmin IV:Storage Management (Unit 2) – SCSI Fundamentals

Unit Objectives:
– Describe the SCSI communication model
– Tell the difference between various SCSI technologies (for example, SCSI-1, SCSI-2, Single Ended, Differential)
– Cable a SCSI bus in compliance with length limitations and termination requirements
– Modify some SCSI-specific tuning parameters

SCSI Introduction (1 of 2)
First intelligent interface for midrange and small computers, originally designed simply as a way to attach disk devices to minicomputers, SCSI technology has been expanded to include such peripherals as fixed disks, CD-ROMS, printers plotters, and scanners.

System level interface which provides expansion bus for connecting peripherals.

Because SCSI functions like a sub-bus, devices can exchange data among themselves without the intervention of the host computer.

Computers may communicate with a large number of devices of different types connected to the system unit through a SCSI controller and daisy-chained cable.

Each attached device has a unique address to allow the operating system to communicate with it.

SCSI Introduction (2 of 2)
Data can be transmitted either synchronously, or asynchronously, depending upon the capabilities of the device used.

The SCSI controller may be in the form of an adapter, or may be integrated on the motherboard.

The SCSI Common Command Set (CCS) sends out a common set of instructions to all SCSI hardware.

There are several terms and concepts used in discussing SCSI technology SCSI-1, SCSI-2, SCSI-3, Ultra SCSI, Ultra2 SCSI, Ultra3 SCSI, fast SCSI, wide SCSI, fast and wide SCSI.

Downward compatiblity is maintained so that SCSI-I devices can be attached to SCSI-2 buses.

SCSI Standards Overview (1 of 3)
Original standard approved in 1986
Defined cabling, command sets, transfer modes
Parallel interface, sometimes call “Parallel SCSI”
Support for disk and tape devices
Allows up to 7 devices on an 8-bit bus
Transfer rates of up to 5MB/s
Often referred to as “narrow” SCSI, identified by its single 50-pin connector.

SCSI Standards Overview (2 of 3)
Approved as a standard in 1994
Expanded command set
Supports up to 16 devices on a 16-bit bus
Supports up to 32 devices on a 32-bit bus
“Wide SCSI” (16 and 32 bit buses)
Transfer rates up to 10 MB/s (Fast SCSI)
Added command queuing to improve performance
Require 68-pin connectors

SCSI Standards Overview (3 of 3)
Partitioned into multiple standards (documents)
Still considered a “work inprogress”
Physical transports using newer technology to support serial,
fibre channel, and “FireWire” devices
Transfer rates: 400-1000 MB/s

Single cable
16 bit interface
up to 40 MB/s

Low-voltage differential (LVD) provides lower power than HVD
Supports 12 devices on a 12 meter cable

still in the works. Not implemented yet
Proposed to double the speed
CRC to protect data integrity

Officially renamed to Ultra320
Stay tuned for more information

Characteristics of SCSI Levels
Level Bus Clock MB/s(8bit) MB/s(16bit) Length SE(m) Length DE(m)
—————- ————— ————— —————– ——————– ——————–
SCSI-1 5MHz 5 – 6.00 meters —
SCSI-2 10MHz 10 20 4.75 meters 19/25^3
Ultra SCSI 20MHz 20 40 1.80 meters 19/25^3
Ultra2 SCSI 40MHz 40 80 — 12 (LVD)
Ultra 3SCSI 40MHz 80 160 <= 12 (LVD) Single Ended and Differential Signaling (Cables look the same) ------------------------------------------------------------------------------------------- SE (Single Wire) measures the absolute voltage of the data lines. DE/LVD (Two Wires) measures the voltage difference of the data line pair. (Fewer errors but more expensive) Single Ended and Differential Caveats ------------------------------------------------------- Classic SE and DE Alternatives - Are electrically incompatible - Use the same connectors and cables - May be distriguished by different labels or icons only Mixture of SE and DE - Disrupts the operation of the entire bus - Can even cause hardware damage LVD host adapters - Can operate either in classic SE or LVD mode - Do not allow a mixture of both types in the same bus Single Host Cabling and Termination ------------------------------------------------------ Exactly two terminators are needed - Must be located at the physical ends of the bus - Prevent signal reflection Hot Plugging is not supported even with special plugs Termination is lost when disconnected Terminators are on the adapter card and at the end of the chain Each device has a SCSI Address - The adapter is always address 7. Multiple Host Y-Cabling and Termination ----------------------------------------------------------- Allows removal of a host for repair action - The failing maching has to be powered off before disconnection - Removing a Y-plug is unsupported as long as the bus is in use Bus stays intact, other nodes can resume operation SCSI IDs ----------------------------- Each device on a bus needs a unique ID - 8-bit SCSI supports 0-7, 16-bit SCSI 0-15 - Host adapter address defaults to ID 7 - The ID determines the arbitration priority Arbitration Priority Level for accessing devices (Highest) 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 (Lowest) ID is normally set via jumpers, DIP switches or similar SCSI adapters for RS/6000 don't have an ID switch - ID is set via software (configure method) and stored in the ODM - IDs <> 7 are programmed into the adapter when cfgmgr runs
– If a machine has been booted in maintenance mode, adapters have ID 7

Note: Always shut down the system before adding another SCSI device. Set the address of the new device, add terminator, bring system back up.

LEDs 223-229 SCSI errors

ID 7 and Shared SCSI Buses
Additional Hints for setting up shared tape drieves
– Place adpaters in the same slots on each system.
– Both nodes must have the same number of internal tape drives.
ID 5 & 6 – in production mode
ID 7 – in maintenance mode

Setting a SCSI Adapter’s ID
Change/Show characteristics of a SCSI Adapter

Logical Units (LUNs)
Purpose: Several “virtual” devices via a single controller (ID).
– Different operational characteristics of a single device
– Drive groups within a RAID system
Host Adapter ascsi 0 Slot5 (00-05)
LUN 0 = hdisk2 – 00-05-01-2,0
LUN 1 = hdisk3 – 00-05-01-2,1
LUN 2 = hdisk4 – 00-05-01-2,2
LUN 3 = hdisk5 – 00-05-01-2,3
LUN 4 = hdisk6 – 00-05-01-2,4
Can have up to 8 SCSI devices on each LUN.

SCSI Bus Communications
Only one transfer is possible at a time.
– It is possible to saturate an adapter with a single peripheral
– Newer devices support disconnection
— If next command takes time (for example, seek), the target may dissconnect and free the bus.
— When data becomes available, the target reconnnects (that is, arbitrates for the bus) and begins transfer.
— Makes sense with disks in transaction-oriented environments.
— Generates overhead for devices that perform best with a continuous data stream (for example, tape drives)
Processing a queue of commands has to be supported by:
– The peripheral and the host adapter
– The AIX drivers for both components

Using SCSI Command Queueing (Generate already setup for IBM equipment)
Note: The parameter setting for IBM disks is automatic.
OEM disks is done via chdev (smit chgdsk).
lsdev -Cl hdisk2
lsattr -El hdisk2
varyoffvg datavg
chdev -l hdisk2 -a q_type=simple -a queue_depth=4
varyonvg datavg

SCSI Adapter Tuning
Number of outstanding requests:
– Especially useful with several disks on a single bus.
– Default value is hardware-dependent and
— is adjusted automatically if certain IBM devices are connected.
— can be manually tuned with some adpaters
lsattr 0El vscsi1
varyoffvg datavg
chdev -l vscsi1 -a num_cmd_elem=64 -P
varyonvg datavg

Tuning I/O for Disk Striping (1 of 2)
– I/O is bandwidth-oriented (MB/s)
– Data is stored in striped LVs or RAID LUNs.

Tuning Techniques:
– Make the SCSI disk driver bundle several smaller requests into larger ones.
– This is controled by the max_coalesce parameter
— Understood by the driver if present
— Not contained in the ODM by default
— Has to be defined in PdAt via odmadd
Requires a bosboot and a subsequent reboot
— Not shown in lsattr output

Tuning I/O for Disk Striping (2 of 2)
Increase lvm_bufcnt: vmtune -u value
– Useful with striped raw LVs only
– Write sizes have to be 1.125 MB or more
Increase numfsbuf: vmtune -b value
– Suitable for filesystems in striped LVs or disk arrays
– No threshold for write sizes contained in the documentation
Increase numclust: vmtune -c value
– Causes more than one (default) 16KB cluster to be processsed by the write-behind algorithm.
– numclust is a system-wide setting
– May be limited by maxrandwrt (vmtune -W value) on a per-file basis

Disk Reservation:
Purpose: prevent data corruption in a multihost environment

– Occurs on SCSI command level with SCSI and older SSA adapters
– varyonvg (without special options) reserves the disks to that system
– varyoffvg releases the reservation
– May be broken by a reset operation on a particular disk

Problem: disables any kind of data access
– Other host’s cfgmgr cannot read the PVID
– importvg cannot read VGDA and LVCBs.
– Has to be omitted in SCSI concurrent access environments.

Unit Summary
The history of SCSI
The characteristics of various SCSI technologies
The SCSI communication scheme
How to cable conventional and shared SCSI buses
SCSI-related tuning parameters with AIX

lsdev -Cc disk (Displays all disks on the system)
lsdev -Cc adapter | grep scsi
lscfg -vl scsi0

Checkpoint Questions
1. Which organization maintains the official SCSI standards?
2. What is the main advantage of differential (or LVD) versus single ended signaling?
Length of the cabling, sends two signals down the line on two lines
3. Is it possible to mix SE and DE equipment?
Yes, but you shouldn’t. The cables look the same so be careful.
4. Where do the terminators have to placed on the SCSI bus?
On the adapter card and the last device
5. Which IDs should you assign to the adpaters in a shared SCSI bus
ID 5 and 6 but not 7 since maintenance mode will use 7
6. What are logical units (LUNs) used for?
To add more devices
7. Which feature allows a SCSI device to free the bus if it needs time to deliver the required data?
8. How many transfers can simultaneously occur on a bus with two host adpaters and four disks?
Just one transfer
9. What is the purpose of disk reservation?
Prevent data corruption

Leave a Reply

Your email address will not be published. Required fields are marked *