SMART error (CurrentPendingSector) detected on host

CONTENTS


Lastmodified 2018-03-20 (火) 17:12:19


http://ttgcameback.blogspot.jp/2017/02/smartd-currently-unreadable-pending.html

SMART error (CurrentPendingSector) detected on host 2

1 Currently unreadable (pending) sectors 1 Offline uncorrectable sectors

現状のsmart値

# 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

直せないセクタは

# 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 --test=long /dev/ada0
# smartctl /dev/ada0 --log=selftest
# 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コマンド

このコマンドは、e2fsprogsパッケージの一部なので、インストール。

portinstall e2fsprogs 
# badblocks -b 32768 -v /dev/ada0
Checking blocks 0 to 15262079
Checking for bad blocks (read-only test):
# 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/ada0
debugfs 1.44.0 (7-Mar-2018)
Checksum errors in superblock!  Retrying...
/dev/ada0: Bad magic number in super-block while opening filesystem
/dev/ada0 contains `DOS/MBR boot sector; partition 1 : ID=0xa5, active, start-CHS (0x0,1,2), end-CHS (0x3ff,255,63), startsector 64, 976773103 sectors' data
debugfs:  testb 7515017
testb: Filesystem not open
# 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

コマンドは簡潔ですがパラメータを間違えたとたんにもっとトラブルを呼び込みますので十分ご注意ください。 ブロックサイズと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 1541:本日 1:昨日 1

Counter: 1541, today: 1, yesterday: 1

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-03-20 (火) 17:12:19