The Linux 2.4 SCSI subsystem HOWTO

Douglas Gilbert


Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.

For an online copy of the license see


Revision History
Revision 2.12003-06-20dpg
scsihosts change -> run mkinitrd, lk 2.4.21
Revision 2.02003-05-04dpg
lk2.4.20, linuxdoc->tldp, sATA and SAS, last sector on raw devs, blockdev
Revision 1.92002-11-20dpg
convert to xml, lk2.4.19, spelling
Revision 1.82002-05-05dpg
scsihosts comma delimiter, grub+lilo
Revision 1.72002-04-27dpg
mkinitrd, scsi_debug, 2.4.18, more ATAPI
Revision 1.62002-01-26dpg
ATAPI cdrom selection
Revision 1.52001-12-21dpg
16 byte SCSI commands, SCSI_IOCTL_GET_PCI
Revision 1.42001-08-26dpg
spelling, dd_rescue, mkinitrd example, lk 2.4 changes, 1394.
Revision 1.32001-08-26dpg
ATAPI CDROM section, alter title, U320, iSCSI.
Revision 1.22001-03-25dpg
Information about scu, dt, "Alt" sequences, more notes.
Revision 1.12001-01-22dpg
Add osst description, _EXTRA_DEVS limitations.


This document describes the SCSI subsystem as the Linux kernel enters the 2.4 production series. An external view of the SCSI subsystem is the main theme. Material is included to help the system administration of the Linux SCSI subsystem. There are also brief descriptions of ioctl()s and interfaces that may be relevant to those writing applications that use this subsystem.

Table of Contents

1. Introduction
2. Architectural Overview
3. Names and Addresses
SCSI Addressing
Device Names
Device Names in devfs
Device Names in scsidev
4. Kernel Configuration
5. Boot Parameters
6. Modules and their Parameters
7. Proc pseudo file system
8. Mid Level, Unifying layer
boot parameters
module parameters
proc interface
9. Upper level drivers
Disk driver (sd)
sd boot parameters
sd module parameters
CDROM driver (sr or scd)
sr boot parameters
sr module parameters
sr proc interface
ATAPI cdroms
Tape driver (st)
st boot parameters
st module parameters
st proc interface
osst driver for OnStream devices
Generic driver (sg)
sg boot parameters
sg module parameters
sg proc interface
10. Lower Level drivers
Pseudo drivers
11. Raw devices
12. Devfs pseudo file system
A. Common bus types (SCSI and other)
B. Changes between lk 2.2 and (during) 2.4
Mid level changes
sd changes
sr changes
st changes
sg changes
Changes during the lk 2.4 series
C. Troubleshooting
D. Performance, Test and Debugging tools
E. Compile options and System calls including ioctls
Mid level
Mid level compile options
Mid level ioctls
sd driver
sd compile options
sd ioctls and user interface
sr driver
sr compile options
sr ioctls and user interface
st driver
st compile options
st ioctls and user interface
sg driver
sg compile options
sg ioctls and user interface
F. References, Credits and Corrections