# Lazy disk



## balanga (Feb 14, 2018)

I have 500GB disk which seems to frequently pause, in fact I often need to switch on my laptop several times before it is recognised. Are there any options to smartctl which could identify the problem?


----------



## SirDice (Feb 14, 2018)

Just the regular `smartctl -a /dev/ada0`. 

Take note of things like Spin up Time, Power Cycle Count, and maybe some power-saving options. 

As drives get older they tend to take longer to spin up the platters. If they're really old this might take too long and the computer/controller already timed out waiting for the drive to come online. It could also be related to power issues, the disk might be trying to draw more power than the PSU can supply, causing it to cut out.  Or some power-save function that keeps turning the drive off.


----------



## balanga (Feb 15, 2018)

`smartctl -a /dev/ada0`

```
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MK..61GSY[N]
Device Model:     TOSHIBA MK5061GSYN
Serial Number:    5195F2TYS
LU WWN Device Id: 5 000039 34698332c
Firmware Version: MH000C
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Feb 14 19:20:01 2018 UTC
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:  (0x02)    Offline data collection activity
                    was completed without error.
                    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:         (  120) seconds.
Offline data collection
capabilities:              (0x51) SMART execute Offline immediate.
                    No Auto Offline data collection support.
                    Suspend Offline collection upon new
                    command.
                    No 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:      (   2) minutes.
Extended self-test routine
recommended polling time:      ( 112) minutes.
SCT capabilities:            (0x003f)    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     0x002f   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0027   100   100   050    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0023   100   100   002    Pre-fail  Always       -       2365
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       5223
  5 Reallocated_Sector_Ct   0x0033   078   078   010    Pre-fail  Always       -       451
  7 Seek_Error_Rate         0x002f   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Minutes        0x0032   075   075   000    Old_age   Always       -       166h+47m
 10 Spin_Retry_Count        0x0033   204   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4814
183 Runtime_Bad_Block       0x0032   100   100   001    Old_age   Always       -       331
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
185 Unknown_Attribute       0x0032   100   100   001    Old_age   Always       -       65535
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   095   000    Old_age   Always       -       193
189 High_Fly_Writes         0x003a   100   100   001    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   062   044   040    Old_age   Always       -       38 (Min/Max 33/39)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       47
192 Power-Off_Retract_Count 0x0022   100   100   000    Old_age   Always       -       10682531
193 Load_Cycle_Count        0x0032   092   092   000    Old_age   Always       -       82497
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       33
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 1
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 1 occurred at disk power-on lifetime: 4412 hours (183 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 41 c0 6a 6d 16 60  Error: ICRC, ABRT at LBA = 0x00166d6a = 1469802

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  61 0b c0 60 6d 16 40 00      00:24:40.209  WRITE FPDMA QUEUED
  61 70 b8 c0 11 12 40 00      00:24:30.508  WRITE FPDMA QUEUED
  61 20 b0 a0 a3 be 40 00      00:24:30.508  WRITE FPDMA QUEUED
  61 20 a8 c0 03 c9 40 00      00:24:30.507  WRITE FPDMA QUEUED
  61 08 a0 20 cf 61 40 00      00:24:30.504  WRITE FPDMA QUEUED

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%     10006         -
# 2  Short offline       Completed without error       00%     10005         -
# 3  Short offline       Completed without error       00%      9985         -
# 4  Extended offline    Aborted by host               90%      8602         -
# 5  Short offline       Completed without error       00%      8602         -
# 6  Extended offline    Completed without error       00%      6263         -
# 7  Extended offline    Aborted by host               90%      6235         -
# 8  Short offline       Completed without error       00%      1636         -
# 9  Short offline       Completed without error       00%      1635         -
#10  Short offline       Completed without error       00%      1635         -
#11  Short offline       Completed without error       00%      1635         -
#12  Short offline       Completed without error       00%      1635         -
#13  Short offline       Completed without error       00%      1635         -
#14  Short offline       Completed without error       00%      1634         -
#15  Short offline       Completed without error       00%      1634         -
#16  Short offline       Completed without error       00%      1634         -
#17  Short offline       Completed without error       00%      1634         -
#18  Short offline       Completed without error       00%      1633         -
#19  Short offline       Completed without error       00%      1633         -
#20  Short offline       Completed without error       00%      1633         -
#21  Short offline       Completed without error       00%      1633         -

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.
```


----------



## balanga (Feb 15, 2018)

Why didn't my post above format the <code> properly?


----------



## Snurg (Feb 15, 2018)

Or the disk is retrying and retrying, until it managed to read...


```
5 Reallocated_Sector_Ct   0x0033   078   078   010    Pre-fail  Always       -       451
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       33
```

I'd consider backing up and retiring it.


----------



## balanga (Feb 15, 2018)

Just wondered if there is any program or website where you can submit such output for analysis....I'll never understand what all that means.

Is there is any way to tell whether disk failure is imminent?

I guess I need to think about setting up a procedure to back up the whole disk every week, so that I'm ready for that moment.


----------



## Snurg (Feb 15, 2018)

With consumer drives, you'll usually notice they are getting bad when the reallocation count increases and they keep retrying to read for long times, as you have observed with this drive.
Google reported in their study of tens of thousands of drives something that drives starting showing this behavior have a chance of 60% of dying the next two months iirc.


----------



## SirDice (Feb 15, 2018)

The Reallocated_Sector_Ct isn't much of an issue. This just tells you some bad blocks have been remapped to the spare bit of space on the drive. That's actually good. It's certainly a metric you want to keep an eye on but it's not critical if you have some remapped blocks. It's more worrying if you get Reported_Uncorrect because that means the spare bit of drive is used up and it can't automatically remap those bad blocks any more.

I'm more worried about the Spin_Up_Time, this is the time it takes to get the platters at the correct speed. The numbers appear to be quite high. The Power-Off_Retract_Count appears to be rather high too. Perhaps it's being caused by an overzealous power-saving option. 

The G-Sense_Error_Rate should also be taken into account, this is a count of the number of shocks/vibrations, those are not good for spinning rust drives.


----------

