Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SCSI
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==SCSI command protocol== In addition to many different hardware implementations, the SCSI standards also include an extensive set of command definitions. The SCSI command architecture was originally defined for [[parallel SCSI]] buses but has been carried forward with minimal change for use with iSCSI and serial SCSI. Other technologies which use the SCSI command set include the [[ATA Packet Interface]], [[USB mass storage device class|USB Mass Storage class]] and [[Serial Bus Protocol 2|FireWire SBP-2]]. In SCSI terminology, communication takes place between an [[SCSI initiator|initiator]] and a [[SCSI target|target]]. The initiator sends a [[SCSI command|command]] to the target, which then responds. SCSI commands are sent in a Command Descriptor Block (CDB). The CDB consists of a one byte operation code followed by five or more bytes containing command-specific parameters. At the end of the command sequence, the target returns a status code byte, such as 00h for success, 02h for an error (called a Check Condition), or 08h for busy. When the target returns a Check Condition in response to a command, the initiator usually then issues a [[SCSI Request Sense Command|SCSI Request Sense command]] in order to obtain a key code qualifier ([[KCQ]]) from the target. The Check Condition and Request Sense sequence involves a special SCSI protocol called a Contingent Allegiance Condition. There are four categories of SCSI commands: N (non-data), W (writing data from initiator to target), R (reading data), and B (bidirectional). There are about 60 different SCSI commands in total, with the most commonly used being: *Test unit ready: Queries device to see if it is ready for data transfers (disk spun up, media loaded, etc.). *Inquiry: Returns basic device information. *Request sense: Returns any error codes from the previous command that returned an error status. *Send diagnostic and Receive diagnostic results: runs a simple self-test, or a specialised test defined in a diagnostic page. *Start/Stop unit: Spins disks up and down, or loads/unloads media (CD, tape, etc.). *Read capacity: Returns storage capacity. *Format unit: Prepares a storage medium for use. In a disk, a [[low level format]] will occur. Some tape drives will erase the tape in response to this command. *Read: (four variants): Reads data from a device. *Write: (four variants): Writes data to a device. *Log sense: Returns current information from log pages. *Mode sense: Returns current device parameters from [[SCSI mode pages|mode pages]]. *Mode select: Sets device parameters in a mode page. Each device on the SCSI bus is assigned a unique SCSI identification number or ID. Devices may encompass multiple logical units, which are addressed by [[logical unit number]] (LUN). Simple devices have just one LUN, more complex devices may have multiple LUNs. A "direct access" (i.e. disk type) storage device consists of a number of logical blocks, addressed by Logical Block Address ([[SCSI LBA|LBA]]). A typical LBA equates to 512 bytes of storage. The usage of LBAs has evolved over time and so four different command variants are provided for reading and writing data. The Read(6) and Write(6) commands contain a 21-bit LBA address. The Read(10), Read(12), Read Long, Write(10), Write(12), and Write Long commands all contain a 32-bit LBA address plus various other parameter options. The capacity of a "sequential access" (i.e. tape-type) device is not specified because it depends, amongst other things, on the length of the tape, which is not identified in a machine-readable way. Read and write operations on a sequential access device begin at the current tape position, not at a specific LBA. The block size on sequential access devices can either be fixed or variable, depending on the specific device. Tape devices such as half-inch [[9-track tape]], [[Digital Data Storage|DDS]] (4 mm tapes physically similar to [[digital audio tape|DAT]]), [[Exabyte (company)|Exabyte]], etc., support variable block sizes.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)