Meaning of SCSI return codes?

5,260 views
Skip to first unread message

Glinty

unread,
Sep 12, 2007, 8:08:38 PM9/12/07
to open-iscsi
Is there a list somewhere of what the various error codes mean?

kernel: sd 2:0:0:1: SCSI error: return code = 0x00010000
kernel: sd 2:0:0:1: SCSI error: return code = 0x00020000
kernel: sd 2:0:0:1: SCSI error: return code = 0x00040000
kernel: sd 2:0:0:1: SCSI error: return code = 0x00050000
kernel: sd 2:0:0:1: SCSI error: return code = 0x06000000

0x00020000 seems to happen when the TCP connection is closed, but what
about the rest?

I don't see ASC/ASCQ values so I assume these aren't coming back from
the target as such.

Thanks

Mike Christie

unread,
Sep 13, 2007, 3:35:56 PM9/13/07
to open-...@googlegroups.com
Glinty wrote:
> Is there a list somewhere of what the various error codes mean?
>
> kernel: sd 2:0:0:1: SCSI error: return code = 0x00010000

DID_NO_CONNECT

iscsi layer returns this if replacement/recovery timeout seconds has
expired or if user asked to shutdown session.

> kernel: sd 2:0:0:1: SCSI error: return code = 0x00020000

DID_BUS_BUSY

iscsi layer returns this to ask scsi layer to requeue IO, when there is
a connection error.


> kernel: sd 2:0:0:1: SCSI error: return code = 0x00040000

DID_BAD_TARGET iscsi layer returns this when we get some bad output from
target. For example if the target indicates there was underflow but the
iscsi pdu's rescount does not indicate it.

> kernel: sd 2:0:0:1: SCSI error: return code = 0x00050000

DID_ABORT if the scsi error handler asked us to abort a command and it
was successfully aborted we fail it with this.

> kernel: sd 2:0:0:1: SCSI error: return code = 0x06000000

Not sure, but I will look deeper.

>
> 0x00020000 seems to happen when the TCP connection is closed, but what
> about the rest?
>
> I don't see ASC/ASCQ values so I assume these aren't coming back from
> the target as such.
>

The ones I gave some info for are scsi host errors. I guess
DID_BAD_TARGET is really a target error but the scsi host sets it
because it looks like the target messed something up in this case.

Mike Anderson

unread,
Sep 13, 2007, 3:48:45 PM9/13/07
to open-...@googlegroups.com
Mike Christie <mich...@cs.wisc.edu> wrote:
> DID_ABORT if the scsi error handler asked us to abort a command and it
> was successfully aborted we fail it with this.
>
> > kernel: sd 2:0:0:1: SCSI error: return code = 0x06000000
>
> Not sure, but I will look deeper.
>

DRIVER_TIMEOUT.
You had a timeout on your IO.

-andmike
--
Michael Anderson
and...@us.ibm.com

Michael Christie

unread,
Feb 18, 2013, 11:52:01 PM2/18/13
to open-...@googlegroups.com

#define DID_TRANSPORT_FAILFAST  0x0f /* Transport class fastfailed the io */

It means the replacement/recovery timeout fired and the iscsi/scsi layer failed the IO.


On Feb 18, 2013, at 12:26 PM, yyin...@gmail.com wrote:

what sd 5:0:0:0: SCSI error: return code = 0x000f0000 means?
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+...@googlegroups.com.
To post to this group, send email to open-...@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages