ふるた技工所(てっこうしょ)

ふるた技工所(てっこうしょ)

PR

×

キーワードサーチ

▼キーワード検索

プロフィール

Aちゃん22

Aちゃん22

フリーページ

2018.01.07
XML
カテゴリ: ソフト開発日誌
引っ越しの荷物を開けて RaspberryPi3 を再稼働させる。去年の 12月末頃に root filesystem を格納(リンク先は格納手順) していたハードディスク WD7500BPVT に不良ブロックが「広がっている」ことが分かっていた。「広がっている」というのには背景がある。RaspberryPi3 に接続した時に不良ブロックがあったことが分かっていた。不良ブロックの範囲が小さかったので、不良部分を避けるようにパーティションを切って使っていた。

年が明けて RaspberryPi3 と周辺機器を接続して再起動してもエラー多発で起動しない状態を調べ続けていた。ハードディスクから採取可能な範囲でファイルをバックアップ、自作のツールで不良ブロック抽出、不良ブロック狙い撃ちで zero fill、smartctl をしても不良ブロックは殆ど減らず、全領域で zero fill して、 smartctl で不良ブロック再割り当て状況を見てみた 。 Reallocated_Sector_Ct = 531, Current_Pending_Sector = 65213 となった。数値から見て zero fill で交替処理は絶望的な状況だと分かる。
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1
Raw_Read_Error_Rate 0x002f 198 198 051 Pre-fail Always - 3884
3
Spin_Up_Time 0x0027 201 178 021 Pre-fail Always - 941
4
Start_Stop_Count 0x0032 001 001 000 Old_age Always - 648131
5
Reallocated_Sector_Ct 0x0033 133 133 140 Pre-fail Always FAILING_NOW 531
7
Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9
Power_On_Hours 0x0032 052 052 000 Old_age Always - 35287
10
Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11
Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12
Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 174
192
Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 113
193
Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 796096
194
Temperature_Celsius 0x0022 124 088 000 Old_age Always - 23
196
Reallocated_Event_Count 0x0032 001 001 000 Old_age Always - 267
197
Current_Pending_Sector 0x0032 001 001 000 Old_age Always - 65213
198
Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199
UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200
Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0

zero fill 後に残った不良ブロックのマップを見てみた。不良ブロックを避けてパーティションを切って使うと全容量 750Gbyte の 1/3 程度 (250Gbyte) しか使えず、殆どメリットが無いことが分かる。連続した領域では無いので mount の設定も複雑になる。LVM (Logical Volume Manager) あるいは e2fsck -l bad_blocks_to_add_file を使ってまで使う?



不良ブロックを避けて使っても、不良ブロックは広がり、使っている領域を壊していくのだ。

別のハードディスク WD5000BEVT を使うことにした。野良サーバーの副として稼働していたマシンがあった。既に新しいマシンへ交代していて、万が一と思って残していた。このマシンからハードディスクを取り出す。
ああ、こいつも 既に傷ついているのか、Reallocated_Sector_Ct = 4, Reallocated_Event_Count = 1, Current_Pending_Sector = 6 だった 。4.87 年稼働して無傷を期待するのが無理なのかもしれない。
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1
Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 70
3
Spin_Up_Time 0x0027 181 176 021 Pre-fail Always - 1941
4
Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1240
5
Reallocated_Sector_Ct 0x0033 199 199 140 Pre-fail Always - 4
7
Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0
9
Power_On_Hours 0x0032 042 042 000 Old_age Always - 42633
10
Spin_Retry_Count 0x0033 100 100 051 Pre-fail Always - 0
11
Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12
Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 166
192
Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 89
193
Load_Cycle_Count 0x0032 015 015 000 Old_age Always - 556130
194
Temperature_Celsius 0x0022 121 093 000 Old_age Always - 26
196
Reallocated_Event_Count 0x0032 199 197 000 Old_age Always - 1
197
Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 6
198
Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199
UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200
Multi_Zone_Error_Rate 0x0009 100 253 051 Pre-fail Offline - 0

Reallocated_Sector_Ct =4, Reallocated_Event_Count = 1、Current_Pending_Sector = 0 になった 。あれ?交替せずに済んだの?
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1
Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 70
3
Spin_Up_Time 0x0027 181 176 021 Pre-fail Always - 1941
4
Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1240
5
Reallocated_Sector_Ct 0x0033 199 199 140 Pre-fail Always - 4
7
Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9
Power_On_Hours 0x0032 042 042 000 Old_age Always - 42637
10
Spin_Retry_Count 0x0033 100 100 051 Pre-fail Always - 0
11
Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12
Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 166
192
Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 89
193
Load_Cycle_Count 0x0032 015 015 000 Old_age Always - 556130
194
Temperature_Celsius 0x0022 123 093 000 Old_age Always - 24
196
Reallocated_Event_Count 0x0032 199 197 000 Old_age Always - 1
197
Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198
Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199
UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200
Multi_Zone_Error_Rate 0x0009 100 253 051 Pre-fail Offline - 0

パーティションを切り直して、最新の RaspberryPi3 のイメージをコピーする。やり方は前と変わらなかった。ハードディスク上のパーティションを root filesystem として動き出した。

副サーバーで動いていたときの音と変わらないな。可変回転速なのか、アクセスの前後で少し「コー」というこもった音がする。

お金に余裕があった頃は、ポンと代わりのハードディスクを買っていたんだよな。





お気に入りの記事を「いいね!」で応援しよう

最終更新日  2018.01.08 19:04:26コメント(0) | コメントを書く


【毎日開催】
15記事にいいね!で1ポイント
10秒滞在
いいね! -- / --
おめでとうございます!
ミッションを達成しました。
※「ポイントを獲得する」ボタンを押すと広告が表示されます。
x
X

© Rakuten Group, Inc.
X
Design a Mobile Site
スマートフォン版を閲覧 | PC版を閲覧
Share by: