smartdのエラー(Debian/lenny)

雷による停電で自宅ファイルサーバの電源が落ちた。
ログにsmartdのエラーログが出力されていたので調査したときの備忘録。

/var/log/syslogに残されていたエラーログ

起動直後に/var/log/syslogに以下のエラーが残されていた。


Aug 28 01:18:03 loach smartd[13949]: Monitoring 0 ATA and 4 SCSI devices
Aug 28 01:18:04 loach smartd[13949]: Device: /dev/sdd, 1 Currently unreadable (pending) sectors
Aug 28 01:18:04 loach smartd[13949]: Sending warning via /usr/share/smartmontools/smartd-runner to root ...
Aug 28 01:18:04 loach smartd[13949]: Warning via /usr/share/smartmontools/smartd-runner to root: successful
Aug 28 01:18:04 loach smartd[13949]: Device: /dev/sdd, 1 Offline uncorrectable sectors
Aug 28 01:18:04 loach smartd[13949]: Sending warning via /usr/share/smartmontools/smartd-runner to root ...

/dev/sddに「uncorrectable sectors」があると。。。
購入したばかりなのにorz

/dev/sddの調査

とりあえず調べてみる。以下を参考にさせていただいた。
Yasuo's Weblog » Offline uncorrectable sectorsを修復

/dev/sddのテスト


# smartctl --test=short /dev/sdd
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Wed Sep  1 03:33:51 2010

Use smartctl -X to abort test.

2分待てと書いてあるので待つ。

テスト結果表示


# smartctl -l selftest /dev/sdd
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
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%      3812         -

あれ?エラーなしで完了だって。うーん、ログのエラーはなんだったんだろう?
その後エラーが発生しないので様子をみることにする。

ついでにエラー時に自分のメールアドレスにメールを送るよう設定する。

/etc/smartd.conf


DEVICESCAN -m hogepage@example.com -M exec /usr/share/smartmontools/smartd-runner

コメントをどうぞ