SCSI ASC/ASCQ 摘述

前言

前两篇 SCSI相关文章如下,结合本文基本可以快速定位 SCSI相关的问题。例如 U盘、移动硬盘热插拔不识别、读写文件失败或是读写引起 USB disconnect的问题。

SCSI Operation Codes

SCSI 错误信息表整理

正文

出现 SCSI相关错误的时候,我们总能看到下面这样的 log。

1
sd 0:0:0:0: [sda] ASC=0x28 ASCQ=0x0

log里面的关键词是 ASC和 ASCQ,大概的意思是:

ASC(ADDITIONAL SENSE CODE),附加检测码,用来描述 sense key报告的错误或者异常情况的更多信息,如果设备没有错误或者异常情况,则附加检测码应该设置为零。

ASCQ(ADDITIONAL SENSE CODE QUALIFIER),附加检测码的限定符,用来描述与附加检测码相关的详细信息,如果设备没有错误或者异常情况,则附加检测码的限定符应该设置为零。

在 log中 ASC=0x28、ASCQ=0x0,通过查表确定 sense key报告的详细信息是 NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED,大概意思 U盘中的存储介质发生了改变,即 U盘主控还在,但储存介质出现异常,主控无法对储存介质进行读写。例如出现了 U盘主控与介质通信部分的软件或者逻辑异常、介质命令阻塞、遇到坏块等问题,当然具体原因还是要根据实际应用场景分析。

附表

ASC值对应的具体含义如下,ASCQ值对应的具体含义可以跟随链接,在 t10.org了解,或是查询 SCSI Commands Reference Manual –> 2.4.1.6 Additional Sense and Additional Sense Qualifier codes

00h/00h NO ADDITIONAL SENSE INFORMATION

01h/00h NO INDEX/SECTOR SIGNAL

02h/00h NO SEEK COMPLETE

03h/00h PERIPHERAL DEVICE WRITE FAULT

04h/00h LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE

05h/00h LOGICAL UNIT DOES NOT RESPOND TO SELECTION

06h/00h NO REFERENCE POSITION FOUND

07h/00h MULTIPLE PERIPHERAL DEVICES SELECTED

08h/00h LOGICAL UNIT COMMUNICATION FAILURE

09h/00h TRACK FOLLOWING ERROR

0Ah/00h ERROR LOG OVERFLOW

0Bh/00h WARNING

0Ch/00h WRITE ERROR

0Dh/00h ERROR DETECTED BY THIRD PARTY TEMPORARY INITIATOR

0Eh/00h INVALID INFORMATION UNIT

10h/00h ID CRC OR ECC ERROR

11h/00h UNRECOVERED READ ERROR

12h/00h ADDRESS MARK NOT FOUND FOR ID FIELD

13h/00h ADDRESS MARK NOT FOUND FOR DATA FIELD

14h/00h RECORDED ENTITY NOT FOUND

15h/00h RANDOM POSITIONING ERROR

16h/00h DATA SYNCHRONIZATION MARK ERROR

17h/00h RECOVERED DATA WITH NO ERROR CORRECTION APPLIED

18h/00h RECOVERED DATA WITH ERROR CORRECTION APPLIED

19h/00h DEFECT LIST ERROR

1Ah/00h PARAMETER LIST LENGTH ERROR

1Bh/00h SYNCHRONOUS DATA TRANSFER ERROR

1Ch/00h DEFECT LIST NOT FOUND

1Dh/00h MISCOMPARE DURING VERIFY OPERATION

1Eh/00h RECOVERED ID WITH ECC CORRECTION

1Fh/00h PARTIAL DEFECT LIST TRANSFER

20h/00h INVALID COMMAND OPERATION CODE

21h/00h LOGICAL BLOCK ADDRESS OUT OF RANGE

22h/00h ILLEGAL FUNCTION (USE 20 00, 24 00, OR 26 00)

23h/00h INVALID TOKEN OPERATION, CAUSE NOT REPORTABLE

24h/00h INVALID FIELD IN CDB

25h/00h LOGICAL UNIT NOT SUPPORTED

26h/00h INVALID FIELD IN PARAMETER LIST

27h/00h WRITE PROTECTED

28h/00h NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED

29h/00h POWER ON, RESET, OR BUS DEVICE RESET OCCURRED

2Ah/00h PARAMETERS CHANGED

2Bh/00h COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT

2Ch/00h COMMAND SEQUENCE ERROR

2Dh/00h OVERWRITE ERROR ON UPDATE IN PLACE

2Eh/00h INSUFFICIENT TIME FOR OPERATION

2Fh/00h COMMANDS CLEARED BY ANOTHER INITIATOR

30h/00h INCOMPATIBLE MEDIUM INSTALLED

31h/00h MEDIUM FORMAT CORRUPTED

32h/00h NO DEFECT SPARE LOCATION AVAILABLE

33h/00h TAPE LENGTH ERROR

34h/00h ENCLOSURE FAILURE

35h/00h ENCLOSURE SERVICES FAILURE

36h/00h RIBBON, INK, OR TONER FAILURE

37h/00h ROUNDED PARAMETER

38h/00h EVENT STATUS NOTIFICATION

39h/00h SAVING PARAMETERS NOT SUPPORTED

3Ah/00h MEDIUM NOT PRESENT

3Bh/00h SEQUENTIAL POSITIONING ERROR

3Dh/00h INVALID BITS IN IDENTIFY MESSAGE

3Eh/00h LOGICAL UNIT HAS NOT SELF-CONFIGURED YET

3Fh/00h TARGET OPERATING CONDITIONS HAVE CHANGED

40h/00h RAM FAILURE (SHOULD USE 40 NN)

41h/00h DATA PATH FAILURE (SHOULD USE 40 NN)

42h/00h POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN)

43h/00h MESSAGE ERROR

44h/00h INTERNAL TARGET FAILURE

45h/00h SELECT OR RESELECT FAILURE

46h/00h UNSUCCESSFUL SOFT RESET

47h/00h SCSI PARITY ERROR

48h/00h INITIATOR DETECTED ERROR MESSAGE RECEIVED

49h/00h INVALID MESSAGE ERROR

4Ah/00h COMMAND PHASE ERROR

4Bh/00h DATA PHASE ERROR

4Ch/00h LOGICAL UNIT FAILED SELF-CONFIGURATION

4Eh/00h OVERLAPPED COMMANDS ATTEMPTED

50h/00h WRITE APPEND ERROR

51h/00h ERASE FAILURE

52h/00h CARTRIDGE FAULT

53h/00h MEDIA LOAD OR EJECT FAILED

54h/00h SCSI TO HOST SYSTEM INTERFACE FAILURE

55h/00h SYSTEM RESOURCE FAILURE

57h/00h UNABLE TO RECOVER TABLE-OF-CONTENTS

58h/00h GENERATION DOES NOT EXIST

59h/00h UPDATED BLOCK READ

5Ah/00h OPERATOR REQUEST OR STATE CHANGE INPUT

5Bh/00h LOG EXCEPTION

5Ch/00h RPL STATUS CHANGE

5Dh/00h FAILURE PREDICTION THRESHOLD EXCEEDED

5Eh/00h LOW POWER CONDITION ON

60h/00h LAMP FAILURE

61h/00h VIDEO ACQUISITION ERROR

62h/00h SCAN HEAD POSITIONING ERROR

63h/00h END OF USER AREA ENCOUNTERED ON THIS TRACK

64h/00h ILLEGAL MODE FOR THIS TRACK

65h/00h VOLTAGE FAULT

66h/00h AUTOMATIC DOCUMENT FEEDER COVER UP

67h/00h CONFIGURATION FAILURE

68h/00h LOGICAL UNIT NOT CONFIGURED

69h/00h DATA LOSS ON LOGICAL UNIT

6Ah/00h INFORMATIONAL, REFER TO LOG

6Bh/00h STATE CHANGE HAS OCCURRED

6Ch/00h REBUILD FAILURE OCCURRED

6Dh/00h RECALCULATE FAILURE OCCURRED

6Eh/00h COMMAND TO LOGICAL UNIT FAILED

6Fh/00h COPY PROTECTION KEY EXCHANGE FAILURE - AUTHENTICATION FAILURE

71h/00h DECOMPRESSION EXCEPTION LONG ALGORITHM ID

72h/00h SESSION FIXATION ERROR

73h/00h CD CONTROL ERROR

74h/00h SECURITY ERROR


SCSI ASC/ASCQ 摘述
http://xxxdk.xyz/xxx/2020/06/SCSI-ASC-ASCQ-摘述/
作者
sni
发布于
2020年6月11日
许可协议