本當なら夏が始まる前に行つておけば良かつたのだが、今更乍らにKURO-BOX/PROでS.M.A.R.T.でHDDの監視を行ふ事にした。參考にしたのは以下の頁。
Debianではaptitudeで簡單に入つた。
# /usr/bin/aptitude install smartmontools Reading package lists... Done Building dependency tree Reading state information... Done (中略) Not starting S.M.A.R.T. daemon smartd, disabled via /etc/default/smartmontools (warning). (後略)
取敢へずHDDの情報を取得してみた。
# /usr/sbin/smartctl -a /dev/sda smartctl version 5.38 [armv5tel-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Model Family: Hitachi Deskstar 7K160 Device Model: Hitachi HDS721680PLA380 Serial Number: PVC100Z10PS8MJ Firmware Version: P21OAB3A User Capacity: 82,348,277,760 bytes Device is: In smartctl database [for details use: -P show] ATA Version is: 7 ATA Standard is: ATA/ATAPI-7 T13 1532D revision 1 Local Time is: Sun Sep 28 17:17:49 2008 JST SMART support is: Available - device has SMART capability. SMART support is: Disabled SMART Disabled. Use option -s with argument 'on' to enable it.
メッセージに從つてS.M.A.R.T.を有効にした。
# /usr/sbin/smartctl -s on /dev/sda smartctl version 5.38 [armv5tel-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enabled.
有効に成つた樣なので再度情報を取得してみた。
# /usr/sbin/smartctl -a /dev/sda
smartctl version 5.38 [armv5tel-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Model Family: Hitachi Deskstar 7K160
Device Model: Hitachi HDS721680PLA380
Serial Number: PVC100Z10PS8MJ
Firmware Version: P21OAB3A
User Capacity: 82,348,277,760 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 1
Local Time is: Sun Sep 28 17:26:53 2008 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (1445) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 24) minutes.
SCT capabilities: (0x003f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 138 138 024 Pre-fail Always - 160 (Average 128)
4 Start_Stop_Count 0x0012 098 098 000 Old_age Always - 11658
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 100 100 020 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 099 099 000 Old_age Always - 7473
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 213
192 Power-Off_Retract_Count 0x0032 091 091 000 Old_age Always - 11955
193 Load_Cycle_Count 0x0012 091 091 000 Old_age Always - 11955
194 Temperature_Celsius 0x0002 139 139 000 Old_age Always - 43 (Lifetime Min/Max 19/49)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 253 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
其れから/etc/default/smartmontoolsを編輯してデーモンを起動した。
# /etc/init.d/smartmontools start Enabling S.M.A.R.T..../dev/sda...done. Starting S.M.A.R.T. daemon: smartd.
色々解説を讀んでみて取敢へず以下の樣に設定してデーモンを再起動した。
/etc/default/smartmontoolsは以下の樣に自分の環境に合はせた。
# diff -u /etc/default/smartmontools.org /etc/default/smartmontools --- /etc/default/smartmontools.org 2008-07-25 05:16:41.000000000 +0900 +++ /etc/default/smartmontools 2008-09-28 17:39:35.000000000 +0900 @@ -3,10 +3,10 @@ # List of devices you want to explicitly enable S.M.A.R.T. for # Not needed (and not recommended) if the device is monitored by smartd -#enable_smart="/dev/hda /dev/hdb" +enable_smart="/dev/sda" # uncomment to start smartd on system startup -#start_smartd=yes +start_smartd=yes # uncomment to pass additional options to smartd on startup -#smartd_opts="--interval=1800" +smartd_opts="--interval=1800"
/etc/smartd.confはDEVICESANを無効にして/dev/sda用の設定を追加した。後root宛の電子郵便は携帶に送信する樣にPostfixを設定した。
# diff -u /etc/smartd.conf.org /etc/smartd.conf --- /etc/smartd.conf.org 2008-07-25 05:23:11.000000000 +0900 +++ /etc/smartd.conf 2008-09-28 19:11:38.000000000 +0900 @@ -19,7 +19,7 @@ # Directives listed below, which will be applied to all devices that # are found. Most users should comment out DEVICESCAN and explicitly # list the devices that they wish to monitor. -DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner +#DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner # Alternative setting to ignore temperature and power-on hours reports # in syslog. @@ -141,3 +141,4 @@ # If the test string DEVICESCAN is the first uncommented text # then smartd will scan for devices /dev/hd[a-l] and /dev/sd[a-z] # DEVICESCAN may be followed by any desired Directives. +/dev/sda -a -d sat -m root -M exec /usr/share/smartmontools/smartd-runner
暫くは此れで樣子を見る事にした。