debianをインストールしたi386マシンでSMARTのエラーがメールで飛んできていました。確認して見ると
$ sudo smartctl -A -l selftest /dev/sda
smartctl 6.6 2017-11-05 r4594 [i686-linux-4.19.0-13-686-pae] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 057 048 006 Pre-fail Always - 39283612
3 Spin_Up_Time 0x0003 098 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 0
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 082 060 030 Pre-fail Always - 169422847
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 2126
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 093 093 020 Old_age Always - 7765
194 Temperature_Celsius 0x0022 010 056 000 Old_age Always - 10
195 Hardware_ECC_Recovered 0x001a 057 048 000 Old_age Always - 39283612
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 1
199 UDMA_CRC_Error_Count 0x003e 200 198 000 Old_age Always - 4
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 Data_Address_Mark_Errs 0x0032 100 253 000 Old_age Always - 0
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 90% 2126 57169643
# 2 Short offline Completed: read failure 90% 2126 57169643
# 3 Short offline Completed: read failure 90% 2125 57169643
# 4 Extended offline Completed: read failure 70% 2122 57169643
となっています。Current_Pending_Sector(197)やOffline_Uncorrectable(198)がエラーですが、これらは本来Reallocated_Sector_Ct(5)に移るのが正しい動作で、それが効いていないようなので、本当に壊れてしまっているようです。
smartctlの出力は80文字を超えるので、ウインドウを広くして見ると良いです。
ネットで調べていろいろ試したところ、ファイルシステムを壊してしまい起動できなくなりました。githubに上げてないコードを最小限バックアップしておけたのが、不幸中の幸いでした。
書き込みを行うと修復できるというような情報があったので「wipe-out」で「0を上書きして、このディスクのデータを消す」を実行して、再度debianをインストールして確認したところエラーが消えました。できるだけクリティカルな使用は避けて、ちょっと様子を見たいと思います。(2021/01/31)
$ sudo smartctl -A -l selftest /dev/sda1
smartctl 6.6 2017-11-05 r4594 [i686-linux-4.19.0-13-686-pae] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 061 048 006 Pre-fail Always - 47537876
3 Spin_Up_Time 0x0003 098 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 0
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 082 060 030 Pre-fail Always - 170091422
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 2131
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 093 093 020 Old_age Always - 7774
194 Temperature_Celsius 0x0022 017 056 000 Old_age Always - 17
195 Hardware_ECC_Recovered 0x001a 061 048 000 Old_age Always - 47537876
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 198 000 Old_age Always - 4
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 Data_Address_Mark_Errs 0x0032 100 253 000 Old_age Always - 0
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 2131 -
# 2 Short offline Completed without error 00% 2130 -
# 3 Short offline Completed: read failure 90% 2126 57169643
# 4 Short offline Completed: read failure 90% 2126 57169643
# 5 Short offline Completed: read failure 90% 2125 57169643
# 6 Extended offline Completed: read failure 70% 2122 57169643
badblocksコマンドで確認してみましたが、エラーは出ませんでした。(2021/02/03)
Power_On_Hours(9)のRAW_VALUEは稼働時間で、VALUEは寿命のパーセントの様です。このドライブの寿命(MTBF)は10万(100000)時間ではないかと思われます。
smartctlは内蔵のIDEやSATA以外にもUSB変換もサポートがあります。-dオプションで指定するようです。私が持っているGenesys Logicの製品は対応してないみたいです。
SMARTが普及したのは2000年に入ってからだったようです。