分类: LINUX
2011-02-24 14:26:34
我用FreeBSD 5.2和Debian做了实验,都不错,OpenBSD下面可以直接用atactl,大家看看man atactl,或是下面的帖子。其它linux系统没问题,可以看文章最后给出的官方网站去查询一下你的系统。
1。安装 smartmontools
FreeBSD:
#/usr/ports/sysutils/smartmontools
#make install clean
#cp /usr/local/etc/rc.d/smartd.sh.sample /usr/local/etc/rc.d/smartd.sh
#cp /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf
#chmod 555 /usr/local/etc/rc.d/smartd.sh
Debian:
apt-get install smartmontool*
/etc/smartd.conf
FreeBSD设置文件/usr/local/etc/smartd.conf
Debian设置文件 /etc/smartd.conf
注意:
千万不要忘了改写设置文件!!!!
FreeBSD下第一张IDE硬盘是ad0,SCSI硬盘是da0
Debian下第一张IDE硬盘是/dev/hda,SCSI硬盘是/dev/sda
下面我用FreeBSD做例子,我的硬盘是IDE,如果你的是SCSI,你就去官方网站
启动监护程序:
/usr/local/etc/rc.d/smartd.sh start
首先让我们看一下你的硬盘是否支持SMART:
bash-2.05b# smartctl -i /dev/ad0
smartctl version 5.26 Copyright (C) 2002-3 Bruce Allen
Home page is
=== START OF INFORMATION SECTION ===
Device Model: IBM-DJSA-220
Serial Number: 44K443Z0103
Firmware Version: JS4OAC3A
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 5
ATA Standard is: ATA/ATAPI-5 T13 1321D revision 1
Local Time is: Mon Dec 22 21:04:38 2003 CET
SMART support is: Available - device has SMART capability.
SMART support is: enable
The SMART RETURN STATUS return value (smartmontools -H option/Directive)
can not be retrieved with this version of ATAng, please do not rely on this value
看看我的盘健康测试,如果你的self-assessment test result是FAILING,那就是说
它要完蛋了,马上备份!!!
bash-2.05b# smartctl -Hc /dev/ad0
smartctl version 5.26 Copyright (C) 2002-3 Bruce Allen
Home page is
The SMART RETURN STATUS return value (smartmontools -H option/Directive)
can not be retrieved with this version of ATAng, please do not rely on
this value