- 追加された行はこの色です。
- 削除された行はこの色です。
[[SMART error (CurrentPendingSector) detected on host]]
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*SMART error (CurrentPendingSector) detected on host [#s72e4c33]
http://ttgcameback.blogspot.jp/2017/02/smartd-currently-unreadable-pending.html
*SMART error (CurrentPendingSector) detected on host 2 [#t0a7dca1]
1 Currently unreadable (pending) sectors
1 Offline uncorrectable sectors
*現状のsmart値 [#d7d91da3]
# smartctl -A /dev/sda
(略)
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
(略)
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 1
*直せないセクタは [#r8bc1f19]
# smartctl -t short /dev/sda
# smartctl -l selftest /dev/sdasmartctl
(略)
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 19219 -
# 2 Extended offline Completed without error 00% 233 -
・・エラーなしでチェック完了
# smartctl -t long /dev/sda
# smartctl -l selftest /dev/sda
(略)
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed: read failure 90% 19219 5776104
# 2 Short offline Completed without error 00% 19219 -
# 3 Extended offline Completed without error 00% 233 -
さて、このケースの場合、sdaはboot、root、swapにパーティションを切っているので、fdiskでどのパーティションに含まれているのか調べてみます。
# fdisk -lu /dev/sda
Disk /dev/sda: 82.3 GB, 82348277760 bytes, 160836480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト
Disk label type: dos
ディスク識別子: 0x0001f066
デバイス ブート 始点 終点 ブロック Id システム
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 152578047 75776000 83 Linux
/dev/sda3 152578048 160835583 4128768 82 Linux swap / Solaris
/dev/sda2は rootファイルシステムで、そこにあるよーです。ちっ。
該当するLBAがどこにあるかを調べます。
その計算のためにもう一つパラメータが必要なので、tune2fsでパーティションのブロックサイズを求めます。
# tune2fs -l /dev/sda2|grep -i "block size"
Block size: 4096
4096だそうです。
(エラーブロックー開始ブロック)*セクタサイズ/ブロックサイズ
の公式を手動で計算すると
(5776104 - 1026048)*512/4096 = 593757
となりました。
*badblocksコマンド [#kcd22647]
このコマンドは、e2fsprogsパッケージの一部なので、インストール。
portinstall e2fsprogs
# badblocks -b 4096 -v /dev/sda2
Checking blocks 0 to 18943999
Checking for bad blocks (read-only test):
593757
done
Pass completed, 1 bad blocks found. (1/0/0 errors)
おんなじ数値をお示しになられたようです。
badblocksコマンドはデフォルトではブロックサイズが1024が前提なので-bコマンドでサイズを指定
何かに使われているかをチェックします。
# debugfs /dev/sda2
debugfs 1.42.9 (28-Dec-2013)
debugfs: testb 593757
Block 593757 not in use
使ってないよと言っています。
さらに別のdebugfsのコマンドで念を押してみましょう。
debugfs: icheck 593757
Block Inode number
593757 <block not found>
未使用だということがわかりました。
(ブロックが使われている場合は<block not found>ではなくinodeの値が出てきます。その場合、どのファイルが使っているか調べる場合は ncheck inodeの値で調べられます)。
*dd [#d5a02b89]
コマンドは簡潔ですがパラメータを間違えたとたんにもっとトラブルを呼び込みますので十分ご注意ください。
ブロックサイズとsda2の先頭からの位置を指定して
# dd if=/dev/zero of=/dev/sda2 bs=4096 count=1 seek=593757
1+0 レコード入力
1+0 レコード出力
4096 バイト (4.1 kB) コピーされました、 0.000472186 秒、 8.7 MB/秒
確認してみましょう。
#smartctl -A /dev/sda
(略)
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
(略)
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
(略)
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
・・・何だか知りませんがこのケースの場合、セクタ再配置数が0なのに保留されたセクタも修復不能セクタも0になってしまいました。
ま、とりあえず smartctl -t long /dev/sda で再度チェックします。
# smartctl -l selftest /dev/sda
(略)
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 19221 -
# 2 Extended offline Completed: read failure 90% 19219 5776104
# 3 Short offline Completed without error 00% 19219 -
# 4 Extended offline Completed without error 00% 233 -
1 of 1 failed self-tests are outdated by newer successful extended offline self-test # 1
smartの各パラメータを見てみると、
# smartctl -A /dev/sda
(略)
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 167 167 050 Pre-fail Offline - 166
3 Spin_Up_Time 0x0007 118 118 024 Pre-fail Always - 167 (Average 170)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 120
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 136 136 020 Pre-fail Offline - 31
9 Power_On_Hours 0x0012 088 088 000 Old_age Always - 84758
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 62
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 714
193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always - 714
194 Temperature_Celsius 0x0002 253 253 000 Old_age Always - 21 (Min/Max 13/49)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 253 000 Old_age Always - 0
・・・再配置はやっぱり0のままです。
まあ、買い替えですね。とりあえずサーバを停止して組み付けるのがだるいので時間ができるまではほっとくことにします。
心配なら(そして許されるなら)syncの呪文を唱えて再起動してみるとよいです。
----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);