間違いだらけの備忘録

このページの内容は無保証でありこのページの内容によって直接、または間接に損害を受けられたとしても私は責任を取りません。

smart情報確認

cat bin/smartchk.sh 
cd `dirname $0`
if [ $# -ne 1 ]; then
    echo $0" need disk device"
  exit 1
fi
smartctl -A $1 | awk '$2=="Raw_Read_Error_Rate"||$2=="Reallocated_Sector_Ct"||$2=="Reallocated_Event_Count"||$2=="Current_Pending_Sector"||$2=="Offline_Uncorrectable"' | awk '$4>$6 {print $2 " " $4 " " $5 " " $6}' > smartctl.tmp
if [ -s smartctl.tmp ]; then
    echo $1" NG!"
    cat smartctl.tmp
    exit 1
else
    echo $1"Normal"
    exit 0
fi

参考
http://bitwalker.dtiblog.com/blog-entry-67.html

参照したいくつかのドキュメントで特に重要とされていたのは次の属性。

1 Raw_Read_Error_Rate データ読み込み時に発生したエラーの割合
5 Reallocated_Sector_Ct データを予備エリアに移動した不良セクタ
196 Reallocation Event Count セクタの代替処理が発生した回数
197 Current_Pending_Sector 現在異常があって代替処理を待つセクタ数
198 Offline_Uncorrectable オフラインテストで発見された回復不可能なセクタ数

このページにはhatena以外のサービスからのコンテンツが埋め込まれています。 hatenaによりGoogle AdSense 広告が埋め込まれています。