SCSI Status Code

Last updated

A SCSI Status Code is used to determine the success or failure of a SCSI command. At the end of any command, the target returns a Status Code byte which should be one of the following:

Contents

00h Good

This status code indicates that the device has completed the task successfully.

02h Check Condition

When the target returns a Check Condition in response to a command it is indicating that it has entered a contingent allegiance condition. This means that an error occurred when it attempted to execute a SCSI command. The initiator usually then issues a SCSI Request Sense command in order to obtain a Key Code Qualifier (KCQ) from the target.

04h Condition Met

This status code is returned on successful completion of a Pre-fetch Command.

08h Busy

The target returns Busy if it cannot complete a command at that time, for example if it is in the contingent allegiance condition.

10h Intermediate (obsolete)

The target returns Intermediate when it successfully completes a linked command (except the last command). This status code is obsolete starting with SAM-4.

14h Intermediate - Condition Met (obsolete)

As the name suggests, this status code is simply a combination of 10h Intermediate and 04h Condition Met. This status code is obsolete starting with SAM-4.

18h Reservation Conflict

The target returns this status code if an initiator attempts to access a LUN that has been previously reserved by another initiator using the Reserve or Reserve Unit command.

22h Command Terminated (obsolete)

The target returns this status if the target has to terminate the current I/O process because it received a Terminate I/O Process message. This status code is obsolete starting with SAM-2.

28h Task Set Full

Similar to 08h Busy status, this status code is returned when the logical unit lacks the resources to accept a received task from an I_T nexus. This status code implies that the logical unit already has at least one task from that I_T nexus, where the 08h Busy status code implies that the logical unit currently has no tasks from that I_T nexus.

30h ACA Active

The target returns this status code if an auto-contingent allegiance condition has occurred.

40h Task Aborted

The target returns this status code when a task is aborted by another I_T nexus and the TAS bit in the Control mode page is set to one.

Related Research Articles

SCSI Set of computer and peripheral connection standards

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. 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. The initial Parallel SCSI was 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.

Internet Small Computer Systems Interface or iSCSI is an Internet Protocol-based storage networking standard for linking data storage facilities. iSCSI provides block-level access to storage devices by carrying SCSI commands over a TCP/IP network. iSCSI facilitates data transfers over intranets and to manage storage over long distances. It can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval.

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 by Storage Area Network protocols that encapsulate SCSI, such as Fibre Channel or iSCSI.

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 disk 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.

In computer data storage, a SCSI initiator is the endpoint that initiates a SCSI session, that is, sends a SCSI command. The initiator usually does not provide any Logical Unit Numbers (LUNs).

In computing, channel I/O is a high-performance input/output (I/O) architecture that is implemented in various forms on a number of computer architectures, especially on mainframe computers. In the past, channels were generally implemented with custom devices, variously named channel, I/O processor, I/O controller, I/O synchronizer, or DMA controller.

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.

SCSI target devices provide a number of SCSI diagnostic pages. These can be used by a Send Diagnostic command to tell a target device to run a specialised self-test. The Receive Diagnostic Results command is used where the results from the self-test operation are non-trivial.

Most recent SCSI enclosure products support a protocol called SCSI Enclosure Services (SES). The initiator can communicate with the enclosure using a specialized set of SCSI commands to access power, cooling, and other non-data characteristics.

SCSI Enclosure Services (SES) devices contains a number of elements, each of which is defined by a one byte SCSI element code. There are many different element codes defined to cover various devices as shown in the list below.

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

On a computer SCSI connection, a contingent allegiance condition occurs while a SCSI device reports an error.

Parallel SCSI

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.

The SCSI architectural model provides an abstract view of the way that SCSI devices communicate. It is intended to show how the different SCSI standards are inter-related. The main concepts and terminology of the SCSI architectural model are:

The iSCSI Extensions for RDMA (iSER) is a computer network protocol that extends the Internet Small Computer System Interface (iSCSI) protocol to use Remote Direct Memory Access (RDMA). RDMA is provided by either the Transmission Control Protocol (TCP) with RDMA services (iWARP) that uses existing Ethernet setup and therefore no need of huge hardware investment, RoCE that does not need the TCP layer and therefore provides lower latency, or InfiniBand. It permits data to be transferred directly into and out of SCSI computer memory buffers without intermediate data copies and without much CPU intervention.

The introduction of Serial Attached SCSI (SAS) as the most recent evolution of SCSI required redefining the related standard for enclosure management, called SCSI Enclosure Services. SES-2, or SCSI Enclosure Management 2 first revision, was introduced in 2002 and is now at revision 20. SES-2 SCSI Enclosure Services (SES) permit the management and sense the state of power supplies, cooling devices, LED displays, indicators, individual drives, and other non-SCSI elements installed in an enclosure. SES2 alerts users about drive, temperature and fan failures with an audible alarm and a fan failure LED.

iSCSI conformance testing is testing to determine whether an iSCSI Initiator/Target meets the iSCSI standard.

The IBM System/360 architecture is the model independent architecture for the entire S/360 line of mainframe computers, including but not limited to the instruction set architecture. The elements of the architecture are documented in the IBM System/360 Principles of Operation and the IBM System/360 I/O Interface Channel to Control Unit Original Equipment Manufacturers' Information manuals.

LIO (SCSI target) Open-source version of 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.