Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect disk drive health (SSD corruption, bad blocks, errors) #42

Open
Unitech opened this issue Feb 5, 2017 · 3 comments
Open

Detect disk drive health (SSD corruption, bad blocks, errors) #42

Unitech opened this issue Feb 5, 2017 · 3 comments

Comments

@Unitech
Copy link
Member

Unitech commented Feb 5, 2017

This feature would help to detect hard drive becoming unstable and that begin to requires a potential replacement.

(included in unaccessible server post mortem)

@f-hj
Copy link
Contributor

f-hj commented Feb 5, 2017

Can use the smartctl tool, in package smartmontools. Return the S.M.A.R.T. of the HDD, like

smartctl -d ata -H /dev/sda
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== 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   068   035   045    Old_age   Always   In_the_past 32 (2 27 32 31 0)

@Unitech
Copy link
Member Author

Unitech commented Feb 6, 2017

Nice! But it looks like we need the root rights :( is there any other way?

@Unitech
Copy link
Member Author

Unitech commented Feb 6, 2017

There is also an indicator to get the overall health of a SSD:

>>> sudo smartctl -s on -a /dev/sda | grep Media
233 Media_Wearout_Indicator 0x0013   098   098   000    Pre-fail  Always       -       16584277

The 098 is an indicator on 100 about the SSD health

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants