What does "SCSI error: return code = 0x08000002" (DID_OK, DRIVER_SENSE) events within in messages file mean when they include a description of <<vendor>>
Environment
- Red Hat Enterprise Linux (RHEL) 9
- Red Hat Enterprise Linux (RHEL) 8
- Red Hat Enterprise Linux (RHEL) 7
- Red Hat Enterprise Linux (RHEL) 6
- Red Hat Enterprise Linux (RHEL) 5
Issue
- Events such as the following are reported:
* Events present in messages which include "<<vendor>>" string are not fully explained:sd 0:0:0:0: [sda] tag#0 <<vendor>>ASC=0xe0 ASCQ=0x1 sd 0:0:0:0: [sda] tag#0 <<vendor>>ASC=0xe0 <<vendor>>ASCQ=0x81< sd 0:0:0:0: [sda] tag#0 ASC=0x4 <<vendor>>ASCQ=0x80
orMay 31 12:20:23 host kernel: sd 6:0:0:1: SCSI error: return code = 0x08000002 May 31 12:20:23 host kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK May 31 12:20:23 host kernel: sdd: Current: sense key: Illegal Request May 31 12:20:23 host kernel: <<vendor>> ASC=0x94 ASCQ=0x1ASC=0x94 ASCQ=0x1
orMay 31 12:20:23 host kernel: sd 1:0:0:4: [sdk] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE May 31 12:20:23 host kernel: sd 1:0:0:4: [sdk] Sense Key : Illegal Request [current] May 31 12:20:23 host kernel: sd 1:0:0:4: [sdk] <<vendor>> ASC=0x94 ASCQ=0x1ASC=0x94 ASCQ=0x1
orMay 31 12:20:23 host kernel: sd 6:0:0:1: SCSI error: return code = 0x08000002 May 31 12:20:23 host kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK May 31 12:20:23 host kernel: sdd: Current: sense key: Medium Error May 31 12:20:23 host kernel: ASC=0x44 <<vendor>> ASCQ=0xc6ASC=0x44 ASCQ=0xc6
orMay 31 12:20:23 host kernel: st3: Sense Key : Hardware Error [current] May 31 12:20:23 host kernel: st3: ASC=0x26 <<vendor>> ASCQ=0x81
Jun 22 04:02:10 host kernel: storvsc: Current: sense key: Unit Attention Jun 22 04:02:10 host kernel: <<vendor>> ASC=0x8b ASCQ=0x2ASC=0x8b ASCQ=0x2
-
What do <<vendor>> events mean?
-
How do I determine what these events mean?
-
How can I find out more information about <<vendor>> events in messages?
-
Seeing ' SCSI error: return code = 0x08000002 with "ASC=0xc <<vendor>> ASCQ=0xa8" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "ASC=0x44 <<vendor>> ASCQ=0xc6" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0x80 ASCQ=0x86" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0x80 ASCQ=0x87" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0x94 ASCQ=0x1" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0x95 ASCQ=0x1" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0x95 ASCQ=0x50" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0xc0 ASCQ=0x0" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0xc0 ASCQ=0x3" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0xc4 ASCQ=0x1" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0xe4 ASCQ=0x0" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0xf1 ASCQ=0x80" ' in messages
-
Seeing ' SCSI error: return code = 0x08000002 with "<<vendor>> ASC=0xf1 ASCQ=0xd2" ' in messages
Resolution
- Contacting the storage vendor is required to determine further information.
- Any events within messages which include the strings of the format below mean that additional information that describes why the io did not complete successfully is vendor specific.
- <<vendor>> ASC=0x0NN ASCQ=0xNN, or
- ASC=0xNN <<vendor>> ASCQ=0xNN
- If requested by the storage vendor, open a This content is not included.new Support Case for collaboration with Red Hat, provide the storage vendor's case id and contact information.
Root Cause
____________________________________________________________________________________________ Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.
____________________________________________________________________________________________
The scsi specification controls and defines the set of Additional Sense Codes (ASC), Additional Sense Code Qualifiers (ASCQ). Each unique ASC/ASCQ combination means something, although the standard does not define all combinations with a specific meaning. Storage provides back the ASC/ASCQ within the sense buffer.
The scsi specification reserved certain combinations of ASC/ASCQ to be for definition and use within the standard, and other combinations to be reserved for vendor specific use. The following are those ranges of ASC/ASCQ combinations:
Reserved Reserved
For Standard For Vendor-Specific
Use Use
==================== ====================
ASC ASCQ ASC ASCQ
--------- --------- --------- ---------
0x00-0x7F 0x00-0x77 0x00-0x7F 0x80-0xFF
0x80-0xFF 0x00-0xFF
The sense buffer format is also specified within the scsi standard.
Sense Buffer Layout (Fixed Format)
bit→
↓byte 7 6 5 4 3 2 1 0
+--------+---------+---------+---------+---------+---------+---------+---------+
0 |Valid | Response Code<7> |
+--------+---------+---------+---------+---------+---------+---------+---------+
1 | Segment number<8> (obsolete) |
+--------+---------+---------+---------+---------+---------+---------+---------+
2 |Filemark| EOM | ILI | Reserved| Sense Key<4> |
+--------+---------+---------+---------+---------+---------+---------+---------+
3 | Information |
+--------+---------+---------+---------+---------+---------+---------+---------+
4 | Information |
+--------+---------+---------+---------+---------+---------+---------+---------+
5 | Information |
+--------+---------+---------+---------+---------+---------+---------+---------+
6 | Information |
+--------+---------+---------+---------+---------+---------+---------+---------+
7 | Additional sense length (n-7) |
+--------+---------+---------+---------+---------+---------+---------+---------+
8 | Command-specific information |
+--------+---------+---------+---------+---------+---------+---------+---------+
9 | Command-specific information |
+--------+---------+---------+---------+---------+---------+---------+---------+
10 | Command-specific information |
+--------+---------+---------+---------+---------+---------+---------+---------+
11 | Command-specific information |
+--------+---------+---------+---------+---------+---------+---------+---------+
12 | Additional sense code (ASC) |
+--------+---------+---------+---------+---------+---------+---------+---------+
13 | Additional sense code qualifier (ASCQ) |
+--------+---------+---------+---------+---------+---------+---------+---------+
14 | FRU - Field replaceable unit code |
+--------+---------+---------+---------+---------+---------+---------+---------+
15 | SKSV | Sense-key specific |
+--------+---------+---------+---------+---------+---------+---------+---------+
16 | Sense-key specific |
+--------+---------+---------+---------+---------+---------+---------+---------+
17 | Sense-key specific |
+--------+---------+---------+---------+---------+---------+---------+---------+
18 | Additional sense bytes (variable number of bytes) |
+--------+---------+---------+---------+---------+---------+---------+---------+
19 | Additional sense bytes (variable number of bytes) |
+--------+---------+---------+---------+---------+---------+---------+---------+
: :
. .
+--------+---------+---------+---------+---------+---------+---------+---------+
255 | Additional sense bytes (variable number of bytes) |
+--------+---------+---------+---------+---------+---------+---------+---------+
A sense buffer is not returned for all scsi status, but only for a scsi status code of 02h - Check Condition. This is why you will find ASC/ASCQ events in messages accompanied by:
SCSI error: return code = 0x08000002
02 status byte : SAM_STAT_CHECK_CONDITION - check returned sense data, esp. ASC/ASCQ
00 msg byte : <{likely} not valid, see other fields>
00 host byte : DID_OK, see other fields
08 driver byte : DRIVER_SENSE {scsi sense buffer available from target}
The 02 at the end of the return code indicates the scsi status returned by storage, in this case 02h - Check Condition. To actually check the condition or reason for the io failing, the sense buffer needs to be looked at. The 08 at the front of the return code indicates that a sense buffer was successfully obtained from storage and is available for review by the kernel. The kernel will then look at the sense key, ASC, and ASCQ fields within the sense buffer and, if possible, decode them and output the results.
For example, the following shows the output for ASC/ASCQ pair 0x04/0x03 which is defined within the scsi standard to have a specific meaning:
Apr 15 03:04:47 HOST kernel: sd 4:0:1:1: SCSI error: return code = 0x08000002 Apr 15 03:04:47 HOST kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK Apr 15 03:04:47 HOST kernel: sdj: Current: sense key: Not Ready Apr 15 03:04:47 HOST kernel: Add. Sense: Logical unit not ready, manual intervention required
In this case, the ASC/ASCQ code combination is well defined in the scsi standard and the kernel fully decodes it. The above is an accurate description of what the standard defines for Content from www.t10.org is not included.ASC/ASCQ 04/03. You can see the current set of defined ASC/ASCQ codes on the Content from www.t10.org is not included.T10 website (governing body responsible for the scsi standard) as well as within the appropriate scsi specification document(s).
So while 0x44/0x01 is reserved for standard use and has the current definition of "PERSISTENT RESERVATION INFORMATION LOST", the ASC/ASCQ combination of 0x44/0xC6 is vendor specific because the ASCQ is in the range of 0x80-0xFF. In this latter case the kernel will output "ASC=0x44 <<vendor>> ASCQ=0xc6" to indicate the ASCQ is vendor specific and the kernel is unable to provide additional meaning or information about the reason for io not completing successfully. Nominally, if the ASC is within the range reserved for use by the scsi standard, then any vendor specific ASCQ likely defines a specific type of ASC. For example, 04/xx code combination have to do with device not ready conditions. A vendor specific combination of 04/C8 most likely has to do with reporting some type of device not ready condition that does not fit into one of the 04/xx combinations defined by the standard.
The specific kernel code that outputs events into messages with the <<vendor>> string is below, from which we can see the two different string formats:
drivers/scsi/constants.c:
------------------------
1233 scsi_show_extd_sense(unsigned char asc, unsigned char ascq)
1234 {
1235 const char *extd_sense_fmt = scsi_extd_sense_format(asc, ascq);
1236
1237 if (extd_sense_fmt) {
1238 if (strstr(extd_sense_fmt, "%x")) {
1239 printk("Add. Sense: ");
1240 printk(extd_sense_fmt, ascq);
1241 } else
1242 printk("Add. Sense: %s", extd_sense_fmt);
1243 } else {
1244 if (asc >= 0x80)
1245 printk("<<vendor>> ASC=0x%x ASCQ=0x%x", asc,
1246 ascq);
1247 if (ascq >= 0x80)
1248 printk("ASC=0x%x <<vendor>> ASCQ=0x%x", asc,
1249 ascq);
1250 else
1251 printk("ASC=0x%x ASCQ=0x%x", asc, ascq);
1252 }
Again, the "<<vendor>> ASC=0xNN ASCQ=0xNN" means the ASC code is in the vendor specific range of 0x7F-0xFF. Its immaterial what the ASCQ value is if the ASC value is within the vendor specific range.
While the similar "ASC=0xNN <<vendor>> ASCQ=0xNN" means the ASC code is in the range reserved by the scsi standard for itself -- 0x00 through 0x7F -- but the ASCQ code is in vendor specific range of 0x7F-0xFF.
Obviously because these are vendor specific, each vendor may reuse the same codes as other vendors but for different purposes. Also since these are vendor specific, a vendor may choose to use the same vendor specific code combination in different storage models to mean different things.
See How do I interpret scsi status messages in RHEL like "sd 2:0:0:243: SCSI error: return code = 0x08000002"? for additional information.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.