> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled/smart-ci-die-jian-kang-jian-ce.md).

# SMART 磁碟健康檢測

<div align="left"><img src="/files/-Lo2oU9Fqs4GLi-CgxYu" alt="sdb磁碟狀況不良"></div>

```
smartctl --health /dev/sdb
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-5-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
Failed Attributes:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  2 Throughput_Performance  0x0005   001   001   054    Pre-fail  Offline  FAILING_NOW 16263

```

在"FAILING\_NOW"情況下，需要盡快備份重要文件，特別是屬性是Pre-fail類型時。

![](/files/-Lo-5vfb5jB04HURNtkG)

找出有問題的硬碟，讓有問題的硬碟閃燈

```
apt install ldemon
ledctl locate=/dev/sdb(閃燈)
ledctl locate_off=/dev/sdb(停止閃燈)
```

<div align="left"><img src="/files/-Lo-Dy3Q61v-ouZVPt0Q" alt=""></div>

將有問題的磁碟熱插拔，準備更新

<div align="left"><img src="/files/-Lo-JKj_U2f4D1W1FDJB" alt=""></div>

查看該媒體是否支援 SMART 檢測

smartctl -i /dev/sdx

使用 *-s* 參數開啟它

smartctl -s on /dev/sdx

&#x20;使用 *-H* (health)參數來手動檢查硬碟、隨身硬碟的建康狀態

smartctl -H /dev/sdx

一些錯誤資訊參考

1 Raw Read Error Rate 讀取錯誤率 代表硬碟出現瑕疵

2 Throughput Performance 輸出性能 硬碟可能出現瑕疵,或是整體性能老化&#x20;

3 Spin Up Time 旋上時間 可能代表主軸馬達老化&#x20;

4 Start/Stop Count 啟/停次數 這個值是硬碟主軸馬達啟動/關閉的次數,一般來說就是你開關電源的次數 由於硬碟馬達啟/停時磨耗最大,所以這是一個壽命參考值,但本身不具任何指標性&#x20;

5 Reallocated Sector Count 重分配磁區數量 硬碟內部在發現弱磁區時會將弱磁區的資料重新分配到備用區, 這個值代表碟片可能出現瑕疵&#x20;

6 Read Channel Margin 讀取通道臨界 代表硬碟可能出現瑕疵&#x20;

7 Seek Error Rate 尋軌錯誤率

8 Seek Time Performance 尋軌效能 代表硬碟可能出現瑕疵,或是性能老化

11 Calibration Retry Count 校準重試次數 這個值下降代表硬碟可能出現瑕疵&#x20;

12 Power Cycle Count 電源次數 這個值是硬碟電源/關閉的次數,一般來說就是你開關電源的次數 由於硬碟馬達啟/停時磨耗最大,所以這是一個壽命參考值,但本身不具任何指標性&#x20;

13 Soft Read Error Rate 軟體讀取錯誤率 無法校正的讀取錯誤,通報給作業系統的次數,代表硬碟出現瑕疵&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled/smart-ci-die-jian-kang-jian-ce.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.
