Siduction Forum

Siduction Forum => Software - Support => Topic started by: Lanzi on 2013/02/11, 18:41:35

Title: Smartstatus off my HDDs?
Post by: Lanzi on 2013/02/11, 18:41:35
How do I check with one command or one script the smartstatus of all the HDDs in my siduction-home-server (x-installed)?

I got a new Qnap-Nas and I really like the overview:

#disk1 -> Smart: OK
#disk2 -> Smart: OK
#disk3 -> Smart: OK
#disk4 -> Smart: OK

Can I have this with smartmontool?
Does anybody have a good script?
Title: Smartstatus off my HDDs?
Post by: Smon on 2013/02/11, 21:32:47
You can try this:

for i in `ls /dev/sd?`; do  echo $i: `smartctl -H $i | grep "SMART overall-health self-assessment test result:" | awk '{print $6}'`; done
Title: Smartstatus off my HDDs?
Post by: Lanzi on 2013/02/12, 13:39:53
works very good :-)
Thanks!
Title: Smartstatus off my HDDs?
Post by: Smon on 2013/02/12, 14:06:53
You're welcome.

I haven't tested it with brocken disks, but the output has to be sda?: Failed
Title: Smartstatus off my HDDs?
Post by: sunrat on 2013/04/23, 10:49:18
root@brain:/home/roger# for i in `ls /dev/sd?`; do  echo $i: `smartctl -H $i | grep "SMART overall-health self-assessment test result:" | awk '{print $6}'`; done
/dev/sda: PASSED
/dev/sdb: FAILED!
/dev/sdc: PASSED

I think SMART health checks are a fairly inaccurate way of testing disks. sdb is my oldest disk and it failed SMART check over two years ago and is still working fine. It is also backed up regularly. :)
Title: Smartstatus off my HDDs?
Post by: Smon on 2013/04/23, 11:18:33
Can you please show a "smartctl -a /dev/sdb"?
Title: Smartstatus off my HDDs?
Post by: sunrat on 2013/04/29, 06:39:44
# smartctl -a /dev/sdb
smartctl 5.43 2012-06-05 r3561 [x86_64-linux-3.8-7.towo-siduction-amd64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar SE16 Serial ATA
Device Model:     WDC WD3200KS-75PFB0
Serial Number:    WD-WCAPD3571004
Firmware Version: 21.00M21
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Mon Apr 29 14:34:59 2013 EST
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: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed Attributes.

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
                                       was suspended by an interrupting command from host.
                                       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:                ( 9600) 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:        ( 111) minutes.
Conveyance self-test routine
recommended polling time:        (   6) minutes.
SCT capabilities:              (0x103f) SCT Status supported.
                                       SCT Error Recovery Control 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     0x000f   200   200   051    Pre-fail  Always       -       0
 3 Spin_Up_Time            0x0003   188   184   021    Pre-fail  Always       -       5600
 4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1504
 5 Reallocated_Sector_Ct   0x0033   104   104   140    Pre-fail  Always   FAILING_NOW 763
 7 Seek_Error_Rate         0x000e   200   200   051    Old_age   Always       -       0
 9 Power_On_Hours          0x0032   048   048   000    Old_age   Always       -       38570
10 Spin_Retry_Count        0x0012   100   100   051    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0012   100   100   051    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1374
190 Airflow_Temperature_Cel 0x0022   057   038   000    Old_age   Always       -       43
194 Temperature_Celsius     0x0022   107   088   000    Old_age   Always       -       43
196 Reallocated_Event_Count 0x0032   001   001   000    Old_age   Always       -       763
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       -       8
200 Multi_Zone_Error_Rate   0x0008   200   001   051    Old_age   Offline  In_the_past 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.
Title: Smartstatus off my HDDs?
Post by: Smon on 2013/04/29, 12:05:49
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 104 104 140 Pre-fail Always FAILING_NOW 763

I'd say: good to have a backup ;)
Title: Smartstatus off my HDDs?
Post by: sunrat on 2013/04/30, 16:24:23
Quote from: "Smon"ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 104 104 140 Pre-fail Always FAILING_NOW 763

I'd say: good to have a backup ;)
Indeed. 38570 hours is not a bad life. I think it's about 7 years old.