Error Recovery Level

The Linux SCSI Target Wiki

(Difference between revisions)
Jump to: navigation, search
m
m (See also)
 
(13 intermediate revisions not shown)
Line 3: Line 3:
== Hierarchy ==
== Hierarchy ==
-
The following diagram illustrated the RFC 3270 "Error Recovery Hierarchy":<ref>{{cite web| title=Internet Small Computer Systems Interface (iSCSI)| url=http://tools.ietf.org/html/rfc3720#section-6.1.5,| name=J. Satran, et al.| work=RFC-3270| date=April 2004}}</ref>
+
The following diagram illustrates the RFC 3270 "Error Recovery Hierarchy":<ref>{{cite web| title=Internet Small Computer Systems Interface (iSCSI)| url=http://tools.ietf.org/html/rfc3720#section-6.1.5,| name=J. Satran, et al.| work=RFC-3270| date=April 2004}}</ref>
<pre>
<pre>
Line 41: Line 41:
=== {{anchor|0}} ERL=0: Session Recovery ===
=== {{anchor|0}} ERL=0: Session Recovery ===
-
ERL=0 (Session Recovery) is triggered when failures within a command, within a connection, and/or within TCP occur. This causes all of the previous connections from the failed session to be restarted on a new session by sending a iSCSI ''Login Request'' with a zero TSIH.  
+
ERL=0 (Session Recovery, [http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/target/lio-target/iscsi_target_erl0.c;hb=HEAD iscsi_target_erl0.c]) is triggered when failures within a command, within a connection, and/or within TCP occur. This causes all of the previous connections from the failed session to be restarted on a new session by sending a iSCSI ''Login Request'' with a zero TSIH.  
==== Session recovery ====
==== Session recovery ====
Line 49: Line 49:
==== Session reinstatement ====
==== Session reinstatement ====
-
This is a special case for ERL=0 and recovering the existing I_T nexus.
+
This is a special case for ERL=0 and recovering the existing [[I_T Nexus]].
=== {{anchor|1}} ERL=1: Digest Failure Recovery ===
=== {{anchor|1}} ERL=1: Digest Failure Recovery ===
-
ERL=1 (Digest Failure Recovery) only applies to traditional iSCSI. For iSCSI/SCTP (which has its own CRC32C) and both types of iSER (so far), handling header and data checksum recovery can be disabled.
+
ERL=1 (Digest Failure Recovery, [http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/target/lio-target/iscsi_target_erl1.c;hb=HEAD iscsi_target_erl1.c]) only applies to traditional iSCSI. For iSCSI/SCTP (which has its own CRC32C) and both types of iSER (so far), handling header and data checksum recovery can be disabled.
==== Within Connection Recovery ====
==== Within Connection Recovery ====
Line 73: Line 73:
=== {{anchor|2}} ERL=2: Connection Recovery ===
=== {{anchor|2}} ERL=2: Connection Recovery ===
-
ERL=2 (Connection Recovery), also known as "Internexus-MP", is an optional RFC-3720 feature that allows for both single and multiple communication path sessions within a iSCSI Nexus (and hence the SCSI Nexus) to actively perform realligence/retry on iSCSI ITTs from failed iSCSI connections. ERL=2 allows iSCSI fabrics to take advantage of recovery in all regards of transport level fabric failures, and in a completely OS independent fashion (i.e. below the host OS storage stack).
+
ERL=2 (Connection Recovery, [http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/target/lio-target/iscsi_target_erl2.c;hb=HEAD iscsi_target_erl2.c]), also known as "Internexus-MP", is an optional RFC-3720 feature that allows for both single and multiple communication path sessions within a iSCSI [[I_T Nexus]] (and hence the SCSI Nexus) to actively perform realligence/retry on iSCSI ITTs from failed iSCSI connections. ERL=2 allows iSCSI fabrics to take advantage of recovery in all regards of transport level fabric failures, and in a completely OS independent fashion (i.e. below the host OS storage stack).
-
As it is a SCSI feature, it is generic to the underlying network protocol (fabric module), and has been implemented with iSCSI/TCP, iSCSI/SCTP, and is possible for iSER/DDP, iSER/IB. With the latter case (iSER) traditional iSCSI recovery logic that pertains to ERL=1 is disabled, as the underlying RCaP is handling integrity of payloads using CRC32C or greater checking.
+
As being a SCSI feature, it is generic to the underlying network protocol (fabric module), and has been implemented with iSCSI/TCP, iSCSI/SCTP, and is possible for iSER/DDP, iSER/IB. With the latter case (iSER) traditional iSCSI recovery logic that pertains to ERL=1 is disabled, as the underlying RCaP is handling integrity of payloads using CRC32C or greater checking.
Note that in ERL=0 sessions, all communication paths need to be shutdown/restarted after a recovery exception occurs.
Note that in ERL=0 sessions, all communication paths need to be shutdown/restarted after a recovery exception occurs.
Line 89: Line 89:
Handle new Login Request for existing iSCSI connection handle (CSM-I).
Handle new Login Request for existing iSCSI connection handle (CSM-I).
 +
 +
== RFCs ==
 +
* {{RFC|3720|Internet Small Computer Systems Interface (iSCSI)}}
 +
* {{RFC|5046|Internet Small Computer Systems Interface (iSCSI) Extensions for Remote Direct Memory Access (RDMA)}}
== See also ==
== See also ==
* [[Target]]
* [[Target]]
* [[SCSI]]: [[Persistent Reservations]] (PR), [[Asymmetric Logical Unit Assignment]] (ALUA), [[Multiple Connections per Session]] (MC/S)
* [[SCSI]]: [[Persistent Reservations]] (PR), [[Asymmetric Logical Unit Assignment]] (ALUA), [[Multiple Connections per Session]] (MC/S)
-
* Fabric modules: [[iSCSI]], [[Fibre Channel over Ethernet|FCoE]], [[Fibre Channel]] and [[InfiniBand]]
+
* Fabric modules: [[Fibre Channel]], [[Fibre Channel over Ethernet|FCoE]], [[iSCSI]], [[InfiniBand]] and [[vHost]]
-
* Management: [[RTS Director]], [[RTSadmin]], [[lio-utils]]
+
* Management: [[targetcli]]
-
{{AdSense See also}}
+
== Notes ==
== Notes ==

Latest revision as of 15:59, 23 November 2012

The Error Recovery Level (ERL) is negotiated during a leading iSCSI connection login in traditional iSCSI (RFC 3720) and iSER (RFC 5046).

Contents

Hierarchy

The following diagram illustrates the RFC 3270 "Error Recovery Hierarchy":[1]

                         +
                        / \
                       / 2 \       <-- Connection recovery
                      +-----+
                     /   1   \     <-- Digest failure recovery
                    +---------+
                   /     0     \   <-- Session failure recovery
                  +-------------+

The following table provides an overview over the error recovery capabilities expected from each error recovery level implementation respectively.

ERL Associated Error Recovery Capabilities
0 Session recovery class
(Section 6.1.4.4 - Session Recovery)
1 Digest failure recovery (see note below) plus ERL=0
2 Connection recovery class
(Section 6.1.4.3 - Connection Recovery) plus ERL=1

Note: Digest failure recovery is comprised of two recovery classes: Within-Connection recovery class (Section 6.1.4.2 Recovery Within-connection) and Within-Command recovery class (RFC 3270 Section 6.1.4.1 "Recovery Within-command").

Implementation

The following sections provide more detail over the error recovery capabilities expected from each error recovery level implementation.

ERL=0: Session Recovery

ERL=0 (Session Recovery, iscsi_target_erl0.c) is triggered when failures within a command, within a connection, and/or within TCP occur. This causes all of the previous connections from the failed session to be restarted on a new session by sending a iSCSI Login Request with a zero TSIH.

Session recovery

Restart all iSCSI connections on any failure.

Session reinstatement

This is a special case for ERL=0 and recovering the existing I_T Nexus.

ERL=1: Digest Failure Recovery

ERL=1 (Digest Failure Recovery, iscsi_target_erl1.c) only applies to traditional iSCSI. For iSCSI/SCTP (which has its own CRC32C) and both types of iSER (so far), handling header and data checksum recovery can be disabled.

Within Connection Recovery

Within Command Recovery

Logic to handle recovery / generate R2Ts

Logic to issue SNACK for missing StatSN or DataIN

ERL=2: Connection Recovery

ERL=2 (Connection Recovery, iscsi_target_erl2.c), also known as "Internexus-MP", is an optional RFC-3720 feature that allows for both single and multiple communication path sessions within a iSCSI I_T Nexus (and hence the SCSI Nexus) to actively perform realligence/retry on iSCSI ITTs from failed iSCSI connections. ERL=2 allows iSCSI fabrics to take advantage of recovery in all regards of transport level fabric failures, and in a completely OS independent fashion (i.e. below the host OS storage stack).

As being a SCSI feature, it is generic to the underlying network protocol (fabric module), and has been implemented with iSCSI/TCP, iSCSI/SCTP, and is possible for iSER/DDP, iSER/IB. With the latter case (iSER) traditional iSCSI recovery logic that pertains to ERL=1 is disabled, as the underlying RCaP is handling integrity of payloads using CRC32C or greater checking.

Note that in ERL=0 sessions, all communication paths need to be shutdown/restarted after a recovery exception occurs.

Connection recovery

Handle Logout Request
REMOVECONNFORRECOVERY (CSM-E)
Handle generation of Recovery R2Ts for WRITE
Traditional iSCSI, iSER
Handle recovery DATAIN for READ
Traditional iSCSI, iSER
Handle changed MaxRecvDataSegmentLength across ERL=2
Traditional iSCSI [TODO], iSER [TODO]

Session reinstatement

Handle new Login Request for existing iSCSI connection handle (CSM-I).

RFCs

See also

Notes

External links

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense