Linux/smartd
smartd
smartdでのディスク監視設定をしておく事によって、
ディスクの障害時に自動でアラートメールを飛ばしてくれる。
アラートの飛び先は「disk-alert@flateight.com」に統一する。
インストール †
※CentOSではデフォルトでインストールされている。
# yum -y install smartmontools
自動起動がOnになっている事を確認 †
# chkconfig --list|grep smartd smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
起動 †
# service smartd restart
設定ファイル編集 †
該当のディスク監視オプションで追加する。
※確認方法は以下の「確認のコマンド」で
# vi /etc/smartd.conf -------- 下記追加 ----------------- /dev/sda -a -m disk-alert@flateight.com
確認のコマンド †
3wareの場合 †
#smartctl -t long -d 3ware,0 -a /dev/twa0 #smartctl -t long -d 3ware,1 -a /dev/twa0 #smartctl -t long -d 3ware,2 -a /dev/twa0 #smartctl -t long -d 3ware,3 -a /dev/twa0
Acaptechの場合 †
http://www.cyberciti.biz/faq/linux-checking-sas-sata-disks-behind-adaptec-raid-controllers/
ATAディスクの場合 †
# smartctl -d ata -a /dev/hda
SASの場合 †
# smartctl -d sas -a /dev/sda