Saturday, December 7, 2013

Fedora 19 : S.M.A.R.T. - SMARTd - SMARTctL - SMARTmonTools - gSMARTcontroL




Monitoring Hard Disks with SMART

When a failure is anticipated by S.M.A.R.T., 
the user may choose to replace the drive to avoid unexpected outage and data loss.

Fedora comes with a "smartd" service that will email root if serious problems are detected on disks.

[root@server ~]# yum provides smartd
Loaded plugins: langpacks, refresh-packagekit
smartmontools-6.1-1.fc19.x86_64 : Tools for monitoring SMART capable hard disks
Repo        : fedora
Matched from:
Filename    : /usr/sbin/smartd

smartmontools comes with two programs:
   - smartctl : meant for interactive use
   - smartd   : continuously monitors S.M.A.R.T.


Check smartctl daemon service
   # service smartd status



[root@abxrds ~]# 
[root@abxrds ~]# service smartd status
Redirecting to /bin/systemctl status  smartd.service
smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
   Loaded: loaded (/usr/lib/systemd/system/smartd.service; enabled)
   Active: active (running) since Fri 2013-12-06 22:27:46 EET; 2h 30min ago
 Main PID: 9625 (smartd)
   CGroup: name=systemd:/system/smartd.service
           └─9625 /usr/sbin/smartd -n -q never

Dec 06 22:27:46 abxrds smartd[9625]: Device: /dev/sdb, type changed from 'scsi' to 'sat'
Dec 06 22:27:46 abxrds smartd[9625]: Device: /dev/sdb [SAT], opened
Dec 06 22:27:46 abxrds smartd[9625]: Device: /dev/sdb [SAT], ST2000DM001-9YN164, S/N:Z1E2JV3Q, WWN:5-000c50-04f5f87f8, FW:CC4G, 2.00 TB
Dec 06 22:27:46 abxrds smartd[9625]: Device: /dev/sdb [SAT], found in smartd database: Seagate Barracuda 7200.14 (AF)
Dec 06 22:27:46 abxrds smartd[9625]: Device: /dev/sdb [SAT], WARNING: A firmware update for this drive is available,
Dec 06 22:27:46 abxrds smartd[9625]: see the following Seagate web pages:
Dec 06 22:27:46 abxrds smartd[9625]: http://knowledge.seagate.com/articles/en_US/FAQ/207931en
Dec 06 22:27:46 abxrds smartd[9625]: http://knowledge.seagate.com/articles/en_US/FAQ/223651en
Dec 06 22:27:47 abxrds smartd[9625]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list.
Dec 06 22:27:47 abxrds smartd[9625]: Monitoring 2 ATA and 0 SCSI devices
[root@abxrds ~]# 

To ensure that your drive supports SMART, type:
smartctl -i /dev/sda 

SMART will also give you a lot of detailed information about the drive : 
smartctl -a /dev/sda

[root@gate ~]# smartctl -a /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.11.6-200.fc19.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate SV35
Device Model:     ST2000VX000-1CU164
Serial Number:    S1E2D65T
LU WWN Device Id: 5 000c50 062131fc0
Firmware Version: CV22
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat Dec  7 00:38:33 2013 EET
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: (   97) 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: (   1) minutes.
Extended self-test routine
recommended polling time: ( 223) minutes.
Conveyance self-test routine
recommended polling time: (   2) minutes.
SCT capabilities:       (0x10b9) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

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   113   099   006    Pre-fail  Always       -       54914664
  3 Spin_Up_Time            0x0003   095   095   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       43
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   069   060   030    Pre-fail  Always       -       9313921
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       1483
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       43
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   072   072   000    Old_age   Always       -       28
190 Airflow_Temperature_Cel 0x0022   066   065   045    Old_age   Always       -       34 (Min/Max 22/35)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       15
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       43
194 Temperature_Celsius     0x0022   034   040   000    Old_age   Always       -       34 (0 17 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

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%      1482         -
# 2  Short offline       Completed without error       00%      1478         -
# 3  Short offline       Completed without error       00%        42         -

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.

[root@gate ~]# 


Check the overall health:
smartctl -H /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.11.6-200.fc19.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED



Testing a Drive


You may run any type of test while the drive is mounted although there may be some drop in performance. There are three types of test that can be conducted on a drive:
  1. Short
  2. Extended (Long)
  3. Conveyance
To find an estimate of the time it takes to conduct each test, type:
sudo smartctl -c /dev/sda 

The most useful test is the extended test (long). You can initiate the test by typing:
sudo smartctl -t long /dev/sda 

Results


You can view a drive's test statistics by typing:
sudo smartctl -l selftest /dev/sda 

Suggested application: GSmartControl

[root@gate ~]# yum install gsmartcontrol
Loaded plugins: langpacks, refresh-packagekit
Package gsmartcontrol-0.8.7-2.fc19.x86_64 already installed and latest version

















No comments:

Post a Comment