# mpt2sas驱动系统日志分析

## 常见的`mpt2sas`日志

线上服务器`/var/log/messages`日志

## code(0x03), sub\_code(0x010a)

```
Jan 29 06:30:52 mpt2sas0: log_info(0x3003010a): originator(IOP), code(0x03), sub_code(0x010a)
Jan 29 06:30:52 mpt2sas0: log_info(0x3003010a): originator(IOP), code(0x03), sub_code(0x010a)
```

[Driver mpt2sas0 spam dmesg - mpt2sas0: log\_info(0x30030110): originator(IOP), code(0x03), sub\_code(0x0110) ](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/844555) 提供了排查思路：

* 在运行 `sas2ircu-status` 时会出现上述消息
* Dell提供了一个内建的检测工具可以检查SAS相关故障码
* Russell McOrmond (russell-flora) wrote on 2012-07-11: 更新存储卡的firmware可以修复这个问题

排查案例：

检查硬件

```
#lspci | grep -i lsi
04:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2308 PCI-Express Fusion-MPT SAS-2 (rev 05)
```

> [LSI SAS2308控制芯片](https://github.com/huataihuang/cloud-atlas-draft/tree/6f3204fffc11cf006abd394631e2598d98b415c3/storage/das/mpt2sas/lsisas2308/README.md)

## code(0x11), sub\_code(0x0630)

```
2016-12-12 17:08:32    mpt2sas0: log_info(0x31110630): originator(PL), code(0x11), sub_code(0x0630)
2016-12-12 17:08:33    mpt2sas0: log_info(0x31110630): originator(PL), code(0x11), sub_code(0x0630)
2016-12-12 17:08:35    mpt2sas0: log_info(0x31110630): originator(PL), code(0x11), sub_code(0x0630)
2016-12-12 17:08:36    mpt2sas0: log_info(0x31110630): originator(PL), code(0x11), sub_code(0x0630)
```

## code(0x11), sub\_code(0x1000)

```
2017-02-13 09:09:15    mpt2sas0: log_info(0x31111000): originator(PL), code(0x11), sub_code(0x1000)
2017-02-13 09:09:15    mpt2sas0: log_info(0x31111000): originator(PL), code(0x11), sub_code(0x1000)
```

> 这里`111000`似乎是一个异常的信息，服务器显示负载极高，磁盘`iowait`达到40+，检查磁盘sdg故障导致util达到100，采用[mpt2sas下线故障磁盘](https://github.com/huataihuang/cloud-atlas-draft/tree/6f3204fffc11cf006abd394631e2598d98b415c3/storage/das/mpt2sas/mpt2sas_offline_fail_disk/README.md)方法处理后，这个`0x31111000`不再出现。

## 参考

* [understand mpt2sas kernel messages? ](https://hardforum.com/threads/understand-mpt2sas-kernel-messages.1828901/)
* [Deciphering continuing mpt2sas syslog messages](https://serverfault.com/questions/407703/deciphering-continuing-mpt2sas-syslog-messages)
* [Topic: cache drive changing to read\_only](https://lime-technology.com/forum/index.php?topic=51476.0)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://huataihuang.gitbook.io/cloud-atlas-draft/storage/das/mpt2sas/mpt2sas_kernel_messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
