2021-05-12 14:32:11
RedHat Linux啟動時出現linux smartd 【FAILED】的解決方法
最近愛上RedHat Linux,因為他的GUN精神,於是在努力學習,是用虛擬機器裝的,怕木有辦法直接駕馭這個性格有點怪但是很有魅力的系統,開機時總是顯示smartd進程失敗,於是找到相關技術文章,分享下。
其實還有個問題,我的Linux沒有聲音,音效卡是正常的,但測試聲音就是沒有,下一個目標就是解決這個,呵呵~~
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
http://smartmontools.sourceforge.net/
=== 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
http://smartmontools.sourceforge.net/
=== 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:
http://smartmontools.sourceforge.net
...
# A very silent check. Only report SMART health status if it fails
# But send an email in this case
/dev/hda -a -m
root@localhost.localdomain
...
編輯完/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不再執行!
相關文章