Cek Kesehatan Hardisk dengan Smartctl SmartTools

Pada Sistem Operasi Linux terdapat tools pengecekan hardisk yang cukup bermanfaat yaitu smartctl, Anda bisa menemukan berbagai informasi penting dengan menggunakan tools ini.

Untuk Centos/Redhat install paketnya dengan cara :

# yum install smartmontools

Melihat Informasi Hardisk

# smartctl -i /dev/sdb

Mengaktifkan Smart Monitoring pada Hardisk sdb anda

# smartctl -s on -d ata /dev/sdb

Output :

smartctl version 5.33 [x86_64-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.

Cek Kesehatan Hardisk

# smartctl -d ata -H /dev/sdb

Output

smartctl version 5.33 [x86_64-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

Contoh Hasil Laporan Hardisk yang Fail

smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
Please note the following marginal Attributes:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
190 Airflow_Temperature_Cel 0x0022   044   033   045    Old_age   Always   FAILING_NOW 56 (96 110 58 25)

Menampilkan informasi lengkap tentang hardisk yang Fail

# smartctl --attributes --log=selftest /dev/sda

Contoh output :

smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate     0x000f   098   092   006    Pre-fail  Always       –       238320363
3 Spin_Up_Time            0x0003   100   100   000    Pre-fail  Always       –       0
4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       –       587
5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       –       9
7 Seek_Error_Rate         0x000f   077   060   030    Pre-fail  Always       –       51672328
9 Power_On_Hours          0x0032   095   095   000    Old_age   Always       –       4805
10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       –       0
12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       –       586
184 Unknown_Attribute       0x0032   100   100   099    Old_age   Always       –       0
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       –       417
188 Unknown_Attribute       0x0032   100   099   000    Old_age   Always       –       4295032833
189 High_Fly_Writes         0x003a   094   094   000    Old_age   Always       –       6
190 Airflow_Temperature_Cel 0x0022   044   033   045    Old_age   Always   FAILING_NOW 56 (96 122 58 25)
194 Temperature_Celsius     0x0022   056   067   000    Old_age   Always       –       56 (0 23 0 0)
195 Hardware_ECC_Recovered  0x001a   043   026   000    Old_age   Always       –       238320363
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       –       49
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      –       49
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       –       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      –       172082159686339
241 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      –       2155546016
242 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      –       3048586928
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed: read failure       90%      4789         1746972641

Menampilkan Informasi Lebih Detail tentang Hardisk Anda

# smartctl -d ata -a /dev/sdb

Contoh Output

smartctl version 5.33 [x86_64-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model:     WDC WD2500YS-01SHB0
Serial Number:    WD-WCANY1729333
Firmware Version: 20.06C03
User Capacity:    251,000,193,024 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   7
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Jul  4 15:04:38 2007 CDT
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:  (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
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:                 (7800) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
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:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  92) minutes.
Conveyance self-test routine
recommended polling time:        (   6) minutes.
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     0x000f   200   200   051    Pre-fail  Always       –       0
3 Spin_Up_Time            0x0003   190   187   021    Pre-fail  Always       –       5500
4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       –       24
5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       –       0
7 Seek_Error_Rate         0x000f   200   200   051    Pre-fail  Always       –       0
9 Power_On_Hours          0x0032   092   092   000    Old_age   Always       –       6382
10 Spin_Retry_Count        0x0013   100   253   051    Pre-fail  Always       –       0
11 Calibration_Retry_Count 0x0013   100   253   051    Pre-fail  Always       –       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       –       23
194 Temperature_Celsius     0x0022   127   096   000    Old_age   Always       –       23
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       –       0
197 Current_Pending_Sector  0x0012   200   200   000    Old_age   Always       –       0
198 Offline_Uncorrectable   0x0010   200   200   000    Old_age   Offline      –       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       –       0
200 Multi_Zone_Error_Rate   0x0009   200   200   051    Pre-fail  Offline      –       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.

Menampilkan Error yang Tercatat

# smartctl -l error /dev/sda

Hardisk Selftest

Menampilkan beberapa log penting termasuk masa umur hardisk dan hasilnya tidak langsung bisa ditampilkan tapi menunggu sekitar 2 menit

# smartctl -t short /dev/sda

opsi “short” bisa diganti dengan “long” .

Sample Output

smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: “Execute SMART Short self-test routine immediately in off-line  mode”.
Drive command “Execute SMART Short self-test routine immediately in off-line mode “successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Sun Apr 15 21:29:39 2012

Use smartctl -X to abort test.

Menampilkan hasil dari selftest setelah 2 menit jalankan perintah ini

# smartctl -l selftest /dev/sda

Output

smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       101         –

Perhatikan pada Lifetime yaitu lama penggunaan hardisk 101 jam atau sudah digunakan selama 4 hari

Sumber

http://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html
http://www.linuxjournal.com/content/know-when-your-drives-are-failing-smartd
http://smartmontools.sourceforge.net/smartmontools_scsi.html#selftest

Leave a Reply

Your email address will not be published. Required fields are marked *

What is 5 + 2 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

 

Wordpress SEO Plugin by SEOPressor