Certain VMkernel messages related to storage might contain SCSI Sense codes.

Problem

When you analyze ESXi host's /var/log/vmkernel log files, you encounter events or error messages that contain SCSI Sense codes.

Results

Ability to interpret the SCSI Sense codes can help you better understand problems in your storage environment. Because the SCSI Sense code values are assigned by the T10 committee, you need to consult the T10 standards documentation to determine the meaning of the codes. This topic explains how to use the T10 documentation to interpret the SCSI Sense codes.

Interpreting SCSI Sense Codes

The following is an example of a SCSI error message that appears in the ESXi log file:

2011-04-04T21:07:30.257Z cpu2:2050)ScsiDeviceIO: 2315: Cmd(0x4124003edb00) 0x12, CmdSN 0x51 to dev "naa.600508XXXXXXXXXXXXX" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x5 0x25 0x0

In this example, SCSI Sense codes are represented by two fields, H:0x0 D:0x2 P:0x0 and 0x5 0x25 0x0.

The first field, H:0x0 D:0x2 P:0x0, is a combination of SCSI Status codes for the three components in your storage environment, the host, the device, and the plug-in. The SCSI Status code is used to determine the success or failure of a SCSI command. To interpret each SCSI Status code, see the http://www.t10.org/lists/2status.htm.

Note:

Hexadecimal numbers in the T10 documentation use the NNNh format, while SCSI Sense codes in the ESXi log files follow the 0xNNN format. For example, 0x2 = 02h.

You will get the following interpretation for the status field of the above example: H:0x0 D:0x2 P:0x0 = H(host):GOOD D(device):CHECK CONDITION P(plug-in):GOOD.

The second field in a typical SCSI error message provides more detailed information about the error. It is a combination of Sense Key (sense), Additional Sense Code (asc), and Additional Sense Code Qualifier (ascq) parameters.

For example, the 0x5 0x25 0x0 field from the above error message can be represented as sense=5 asc=25 ascq=0.

To interpret Sense Keys, see http://www.t10.org/lists/2sensekey.htm.

To determine the meaning of the Additional Sense Code (asc) and Additional Sense Code Qualifier (ascq), use the two codes together. See http://www.t10.org/lists/2asc.htm for details.

You should get the following interpretation for the 0x5 0x25 0x0 field:

sense=5 (ILLEGAL REQUEST), ASC=25 ASCQ=0 (LOGICAL UNIT NOT SUPPORTED)