– 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 $ c 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. a Copyright 1 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] 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. 3 Setup SCSI Devices Key files, terms, and utilities SCSI ID /proc/scsi/ scsi_info 4 Resources of interest SCSI-2.4 HOWTO : 5 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 6 SCSI TYPES Name SCSI-1 Fast SCSI Ultra SCSI Ultra2 SCSI Fast Wide SCSI Wide Ultra SCSI Wide Ultra2 SCSI Ultra3 SCSI Ultra320 SCSI Bus Width (bits) 8 8 8 8 16 16 16 16 16 Bus Speed (MB/s) 5 10 20 40 20 40 80 160 320 Max Devices 8 8 8 8 16 16 16 16 16 7 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 8 SCSI Addressing SCSI devices are addressed according to: • SCSI adapter number (host) • channel number (bus) • id number (target) • lun (lun) 9 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 10 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 12 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 13 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 ← 14 /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 15