SCSI CDB

Last updated

In SCSI standards for transferring data between computers and peripheral devices, often computer storage, commands are sent in a Command Descriptor Block (CDB).

Contents

Each CDB can be a total of 6, 10, 12, or 16 bytes, but later versions of the SCSI standard also allow for variable-length CDBs. The CDB consists of a one byte operation code followed by some command-specific parameters. The parameters need not be a full byte long, and the parameter length varies from one command to another. The available commands, with links to articles describing the detailed structure of many of them, are listed in the article section List of SCSI commands.

Typical CDB structures, for the 6- and 16-byte SCSI Request Sense Command, opcode 3, are:

6-byte CDB:

Bit
Byte
76543210
0Operation code = 03h
1LUNReserved
2Reserved
3Reserved
4Allocation length
5Control

16-byte CDB:

Bit
Byte
76543210
0Operation code = 03h
1LUNService Action
2Logical Block (MSB)
3
4
5Logical Block (LSB)
6Addition CBP information
7Addition CBP information
8Addition CBP information
9Addition CBP information
10Allocation length (MSB)
11
12
13Allocation length (LSB)
14Misc. CDB data
15Control

An example with different allocation of bits to parameters is the 6-byte SCSI Mode Sense Command: [1]

Bit
Byte
76543210
0Operation code = 1Ah
1LUNReservedDBDReserved
2PCPage code
3Reserved
4Allocation length
5Control

The generic form of the 12-byte CDB is:

Bit
Byte
76543210
0Operation code
1miscellaneous CDB informationSERVICE ACTION (if required)
2Logical Block (MSB)
3
4
5
6TRANSFER LENGTH (if required)
7PARAMETER LIST LENGTH (if required)
8ALLOCATION LENGTH (if required)
9
10miscellaneous CDB information
11CONTROL

See SPC-4 (http://www.t10.org/cgi-bin/ac.pl?t=f&f=spc4r34.pdf, free registration required) for more information.

Notes

  1. SCSI Command Reference, pp.97-100.

See also

Related Research Articles

Parallel ATA Interface standard for the connection of storage devices

Parallel ATA (PATA), originally AT Attachment, is an interface standard for the connection of storage devices such as hard disk drives, floppy disk drives, and optical disc drives in computers. The standard is maintained by the X3/INCITS committee. It uses the underlying AT Attachment (ATA) and AT Attachment Packet Interface (ATAPI) standards.

Forth is an imperative stack-based computer programming language and environment originally designed by Chuck Moore. Language features include structured programming, reflection, concatenative programming and extensibility. Although not an acronym, the language's name is sometimes spelled with all capital letters as FORTH, following the customary usage during its earlier years.

SCSI set of standards for physically connecting and transferring data between computers and peripheral devices

Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, electrical, optical and logical interfaces. SCSI is most commonly used for hard disk drives and tape drives, but it can connect a wide range of other devices, including scanners and CD drives, although not all controllers can handle all devices. The SCSI standard defines command sets for specific peripheral device types; the presence of "unknown" as one of these types means that in theory it can be used as an interface to almost any device, but the standard is highly pragmatic and addressed toward commercial requirements.

In computing, endianness is the ordering or sequencing of bytes of a word of digital data in computer memory storage or during transmission. Endianness is primarily expressed as big-endian or little-endian. Big-endian systems store the most significant byte of a word at the smallest memory address and the least significant byte at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.

ANSI escape sequences are a standard for in-band signaling to control the cursor location, color, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with Esc and '[', are embedded into the text, which the terminal looks for and interprets as commands, not as character codes.

Fibre Channel (FC) is a high-speed data transfer protocol providing in-order, lossless delivery of raw block data. Fibre Channel is primarily used to connect computer data storage to servers in storage area networks (SAN) in commercial data centers. Fibre Channel networks form a switched fabric because the switches in a network operate in unison as one big switch. Fibre Channel typically runs on optical fiber cables within and between data centers, but can also run on copper cabling.

Atari BASIC BASIC interpreter

Atari BASIC is an interpreter for the BASIC programming language that shipped with the Atari 8-bit family of 6502-based home computers. Unlike most BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC, and differs in significant ways. It includes keywords for Atari-specific features and lacks support for string arrays, for example.

Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk or USB flash drive for initial use. In some cases, the formatting operation may also create one or more new file systems. The first part of the formatting process that performs basic medium preparation is often referred to as "low-level formatting". Partitioning is the common term for the second part of the process, making the data storage device visible to an operating system. The third part of the process, usually termed "high-level formatting" most often refers to the process of generating a new file system. In some operating systems all or parts of these three processes can be combined or repeated at different levels and the term "format" is understood to mean an operation in which a new disk medium is fully prepared to store files. Some formatting utilities allow distinguishing between a quick format, which does not erase all existing data and a long option that does erase all existing data.

Pointer (computer programming) programming language data type

In computer science, a pointer is a programming language object that stores a memory address. This can be that of another value located in computer memory, or in some cases, that of memory-mapped computer hardware. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer. As an analogy, a page number in a book's index could be considered a pointer to the corresponding page; dereferencing such a pointer would be done by flipping to the page with the given page number and reading the text found on that page. The actual format and content of a pointer variable is dependent on the underlying computer architecture.

In computer storage, a logical unit number, or LUN, is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or Storage Area Network protocols which encapsulate SCSI, such as Fibre Channel or iSCSI.

In computing, the BIOS parameter block, often shortened to BPB, is a data structure in the volume boot record (VBR) describing the physical layout of a data storage volume. On partitioned devices, such as hard disks, the BPB describes the volume partition, whereas, on unpartitioned devices, such as floppy disks, it describes the entire medium. A basic BPB can appear and be used on any partition, including floppy disks where its presence is often necessary, however, certain filesystems also make use of it in describing basic filesystem structures. Filesystems making use of a BIOS parameter block include FAT12, FAT16, FAT32, HPFS, and NTFS. Due to different types of fields and the amount of data they contain, the length of the BPB is different for FAT16, FAT32, and NTFS boot sectors. Combined with the 11-byte data structure at the very start of volume boot records immediately preceding the BPB or EBPB, this is also called FDC descriptor or extended FDC descriptor in ECMA-107 or ISO/IEC 9293.

Serial Attached SCSI Point-to-point serial protocol for enterprise storage

In computing, Serial Attached SCSI (SAS) is a point-to-point serial protocol that moves data to and from computer-storage devices such as hard drives and tape drives. SAS replaces the older Parallel SCSI bus technology that first appeared in the mid-1980s. SAS, like its predecessor, uses the standard SCSI command set. SAS offers optional compatibility with Serial ATA (SATA), versions 2 and later. This allows the connection of SATA drives to most SAS backplanes or controllers. The reverse, connecting SAS drives to SATA backplanes, is not possible.

Key Code Qualifier is an error-code returned by a SCSI device.

In SCSI computer storage, computers and storage devices use a client-server model of communication. The computer is a client which requests the storage device to perform a service, e.g., to read or write data. The SCSI command architecture was originally defined for parallel SCSI buses but has been carried forward with minimal change for use with Fibre Channel, iSCSI, Serial Attached SCSI, and other transport layers.

In computer terminology, a Check Condition occurs when a SCSI device needs to report an error.

A SCSI Peripheral Device Type describes the capabilities provided by a SCSI device. It is a five-bit field in the first byte returned in response to an Inquiry Command.

Parallel SCSI original SCSI computer storage bus

Parallel SCSI is the earliest of the interface implementations in the SCSI family. SPI is a parallel bus; there is one set of electrical connections stretching from one end of the SCSI bus to the other. A SCSI device attaches to the bus but does not interrupt it. Both ends of the bus must be terminated.

This article presents a timeline of binary prefixes used to name memory units, in comparison of decimal and binary prefixes for measurement of information and computer storage.

LIO (SCSI target)

In computing, Linux-IO (LIO) Target is an open-source implementation of the SCSI target that has become the standard one included in the Linux kernel. Internally, LIO does not initiate sessions, but instead provides one or more Logical Unit Numbers (LUNs), waits for SCSI commands from a SCSI initiator, and performs required input/output data transfers. LIO supports common storage fabrics, including FCoE, Fibre Channel, IEEE 1394, iSCSI, iSCSI Extensions for RDMA (iSER), SCSI RDMA Protocol (SRP) and USB. It is included in most Linux distributions; native support for LIO in QEMU/KVM, libvirt, and OpenStack makes LIO also a storage option for cloud deployments.

A FAT file system is a specific type of computer file system architecture and a family of industry-standard file systems utilizing it.

References