Linux/smartd の変更点
smartd
[[dokuwiki.fl8.jp転載済み>http://dokuwiki.fl8.jp/doku.php/01_linux/04_%E7%9B%A3%E8%A6%96/smartd%E3%81%A7%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E7%9B%A3%E8%A6%96]]
smartdでのディスク監視設定をしておく事によって、~
ディスクの障害時に自動でアラートメールを飛ばしてくれる。~
アラートの飛び先は「disk-alert@flateight.com」に統一する。
**インストール [#g12ea4f5]
※CentOSではデフォルトでインストールされている。
# yum -y install smartmontools
**自動起動がOnになっている事を確認 [#uf6b9a24]
# chkconfig --list|grep smartd
smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
**起動 [#r983e582]
# service smartd restart
**設定ファイル編集 [#m01e1ca9]
該当のディスク監視オプションで追加する。~
※確認方法は以下の「確認のコマンド」で~
# vi /etc/smartd.conf
-------- 下記追加 -----------------
/dev/sda -a -m disk-alert@flateight.com
**確認のコマンド [#u77f7415]
***3wareの場合 [#n81353f5]
#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の場合 [#x5fae3be]
http://www.cyberciti.biz/faq/linux-checking-sas-sata-disks-behind-adaptec-raid-controllers/
***ATAディスクの場合 [#m55640db]
# smartctl -d ata -a /dev/hda
***SASの場合 [#w920c4d5]
# smartctl -d sas -a /dev/sda