linux smartd啟動失敗

weifenghq發表於2009-03-03
linux smartd啟動失敗
其實一直有學生問我,在系統啟動時(例如學員常用的rhel4系統),有一個叫smartd的程式總是啟動不了,開始時我努力的引導學員自己解決,有一句是“Google”和“百度”是最好的老師,但從個別的學員從培訓初到現在即將結業,同樣的問題仍然在問,鬱悶之餘,我更是覺得,技能培訓不能從根本上解決一個人的就業和發展問題,再出色的培訓學校,再好的老師,不可能一勞永逸地解決一個人職業發展中的所有問題,希望這些話對一部分學員能有所啟發,大家應該時刻問問自己,對於學習,你盡力了嗎?好了,言歸正傳,附上一份較容易理解的答案,以供參考:

smartd是一個守護程式(一個幫助程式),它能監視擁有自我監視,分析和彙報技術(Self-Monitoring,


Analysis, and Reporting Technology - SMART)的硬碟。

SMART系統使得硬碟能監視並彙報自己的執行狀況。它的一個重要特性是能夠預測失敗,使得系統管理員能避免資料丟失。

smartd由kernel-utils包預設安裝。用命令 rpm -ql kernel-utils 可以列出kernel-utils包中的檔案。

smartd守護程式通常在系統啟動的時候被開啟,它的配置檔案是/etc/smartd.conf。

比如,假設有兩個硬碟被安裝,/dev/hda和/dev/hdb。一個是CD_ROM裝置,另一個是硬碟。為了檢測它們

是否支援SMART,使用命令 smartctl -i /dev/hda 和 smartctl -i /dev/hdb:

# /usr/sbin/smartctl -i /dev/hda
smartctl version 5.1-11 Copyright (C) 2002-3 Bruce Allen
Home page is

=== START OF INFORMATION SECTION ===
Device Model: ST380011A
Serial Number: 3JVB672N
Firmware Version: 8.01
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 6
ATA Standard is: ATA/ATAPI-6 T13 1410D revision 2
Local Time is: Fri Aug 20 14:09:16 2004 EST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

”SMART support is: Available - device has SMART capability.“這行說明支援SMART。"SMART

support is: Enabled”這行說明SMART已經被開啟。

CD-ROM裝置和舊式的硬碟不支援SMART,這可以從smartctl -i /dev/hdb的輸出看出:

# /usr/sbin/smartctl -i /dev/hdb
smartctl version 5.1-11 Copyright (C) 2002-3 Bruce Allen
Home page is

=== START OF INFORMATION SECTION ===
Device Model: LTN526D
Serial Number: [No Information Found]
Firmware Version: 9S03
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 1
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Aug 20 14:24:43 2004 EST
SMART is only available in ATA Version 3 Revision 3 or greater.
We will try to proceed in spite of this.
SMART support is: Unavailable - device lacks SMART capability.
A mandatory SMART command has failed: exiting. To continue, use the -T
option to set the tolerance level to 'permissive'

注意有些硬碟控制器不支援SMART。比如有些硬體RAID控制器不支援,或者不會傳遞SMART資訊,即使加入

的硬碟支援SMART。

可以修改/etc/smartctl.conf檔案,使得smartd只監視你想監視的裝置。假設只有/dev/hda需要被監視,

在該裝置上如果有警告資訊發生,需要把它發給根使用者,那麼/etc/smartd.conf需要這樣修改:

# /etc/smartd.conf

# Sample configuration file for smartd. See man 5 smartd.conf.
# Home page is:
...
# A very silent check. Only report SMART health status if it fails
# But send an email in this case
/dev/hda -a -m ...

編輯完/etc/smartd.conf,重啟該守護程式:
# /sbin/service smartd restart
Shutting down smartd: [FAILED]
Starting smartd: [ OK ]

要設定smartd在系統啟動時候被啟用,在根使用者下用 chkconfig smartd on 命令。

關閉smartd服務自動啟動
root LINUX smartd is a daemon that monitors the Self-Monitoring, Analysis and Reporting

Technology (SMART) system built
into many ATA-3 and later ATA, IDE and SCSI-3 hard drives. The purpose of SMART is to

monitor the reliability
of the hard drive and predict drive failures, and to carry out different types of

drive self-tests. This
version of smartd is compatible with ATA/ATAPI-7 and earlier standards
簡單地說,smartd是監控硬碟的可靠性並預測其失敗、進行測試的守護程式!
仔細看看smartd的說明即可!(man smartd)
#chkconfig smartd off
這是關閉smartd服務自動啟動,機器重新啟動時smartd不再執行![@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/633084/viewspace-1017968/,如需轉載,請註明出處,否則將追究法律責任。

相關文章