– General Linux 1 – Setup SCSI Devices [2]

(Linux Professional Institute Certification)

a

   .~.
   /V\      by: geoffrey robertson
  // \\         geoffrey@zip.com.au
  @._.@
$Id: gl1.101.4.slides.tex,v 1.2 2003/05/30 04:57:57 waratah Exp $

aCopyright \begin{matrix}c \\ ◯ \end{matrix} 2002 Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation—either version 2 of the License or (at your option) any later version.

Setup SCSI Devices [2]

(1.1) 101 Hardware & Architecture [11]

1.101.1 Configure BIOS Fundamental Settings [3] 1.101.3 Configure Modem and Sound Cards [2] 1.101.4 Setup SCSI Devices [2] 1.101.5 Set Up Different PC Expansion Cards [2] 1.101.6 Configure Communication Devices [2] 1.101.7 Set Up USB devices [2]

Setup SCSI Devices [2]

Objective

Candidates should be able to configure SCSI devices using the SCSI BIOS as well as the necessary Linux tools.

They also should be able to differentiate between the various types of SCSI.

This objective includes manipulating the SCSI BIOS to detect used and available SCSI IDs and setting the correct ID number for different devices especially the boot device.

It also includes managing the settings in the computer’s BIOS to determine the desired boot sequence if both SCSI and IDE drives are used.

Setup SCSI Devices

Key files, terms, and utilities

SCSI ID
/proc/scsi/
scsi_info

Resources of interest

SCSI-2.4 HOWTO :

SCSI Devices

• SCSI - Small Computer Systems Interface

• SCSI can support a range of devices – Hard disks

– Tape drives

– Scanners

• There are many different types of SCSI based on: – Bus Width

– Bus Speed

– Max no of devices

SCSI TYPES

Name  Bus Width (bits) Bus Speed (MB/s) Max Devices
SCSI-1  8  5  8
Fast SCSI  8  10  8
Ultra SCSI  8  20  8
Ultra2 SCSI  8  40  8
Fast Wide SCSI  16  20  16
Wide Ultra SCSI  16  40  16
Wide Ultra2 SCSI  16  80  16
Ultra3 SCSI  16  160  16
Ultra320 SCSI  16  320  16

SCSI Key Points

• All devices on the SCSI bus are are numbered from 0 to N (7 or 15)

• The SCSI controller is usually numbered 7 or 15

• The higher the device number, the higher its priority

• To boot from a SCSI disk, it must be device 0

• The SCSI bus must be terminated at both ends

• SCSI controllers need a kernel module to make them work

SCSI Addressing

SCSI devices are addressed according to: • SCSI adapter number (host)

• channel number (bus)

• id number (target)

• lun (lun)

SCSI Driver Layers

There are three layers to the SCSI subsystem: • Low level driver - Controller specific • Mid level driver - SCSI unifying layer • Upper level driver - Device specific

SCSI Driver Layers

11

SCSI Driver Layers - Example

Consider an SCSI hard disk as an example • Low level - aha1542.o

• Mid level - scsi mod.o

• Upper level - sd mod

SCSI Upper Level Drivers

• These drivers bind themselves to /dev entries.

• A non exhaustive, but pretty complete list: – Disk driver (magnetic) - sd.o

– Disk driver (optical) - sd mod.o

– CDROM driver - sr.o

– Tape drivers - st.o

– Generic drivers - sg.o

SCSI & the Kernel

• To get SCSI working, you first need to load the appropriate module for your SCSI controller.

• For example: An Adaptec 1542 controller with an attached hard disk you would:

# insmod aha1542 ↩

• Then load the mid level driver:

# insmod scsi mod ↩

• Finally, load the upper level driver:

# insmod sd ↩

/proc/scsi

• To see what devices have been found (at the mid level layer), have a

   look in /proc/scsi:
# cat /proc/scsi/scsi ↩
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: CREATIVE Model: CD5233E     Rev: 1.00
  Type:   CD-ROM              ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: SONY      Model: CD-RW  CRX145E Rev: 1.0b
  Type:   CD-ROM              ANSI SCSI revision: 02