Linux hard drive detects health status

Source: Internet
Author: User
Tags local time

Regularly checking the health of your hard disk is something that every system administrator has to do. When it comes to the health of the hard drive, you have to say s.m.a.r.t first.

Smart is a kind of disk self analysis testing technology, as early as the end of the 90 has been basically popular

Each hard disk (including IDE, SCSI) is running with a number of its own parameters recorded

These parameters include model, capacity, temperature, density, sector, seek time, transmission, BER, etc.

After the hard drive has been running for thousands of hours, many of the intrinsic physical parameters will change

A parameter that exceeds the alarm threshold indicates that the hard drive is approaching damage

At this time the hard drive is still working, if the user ignores this alarm to continue to use

Then the hard drive will become very unreliable and may malfunction at any time.

Smart is compatible with the corresponding function on the motherboard BIOS

To use smart, you must first enter the BIOS setup inside the motherboard to start the relevant settings

Typically, motherboards from the Pentium2 level support smart

After the BIOS starts, it's the operating system level.

Unfortunately, Windows does not have a built-in smart tool (Third-party tool software is required)

Well, on Linux, there was a smart support early on.

If you install Linux on a virtual machine such as VMware, you can see a service startup error when the system starts: SMARTD

This server is the daemon process for smart (because VMware virtual machine hard drive does not support smart, so the error)

You can use the following command to confirm that the hard drive is turned on smart support

The code is as follows:

Smartctl-i/DEV/SDA

You should normally get the following information

The code is as follows:

[Root@localhost ~]# smartctl-i/DEV/SDA

Smartctl version 5.38 [I686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen

Home page is http://smartmontools.sourceforge.net/

The code is as follows:

= = = START of Information section = = =

Model family:seagate Barracuda 7200.10 Family

Device model:st3160815as

Serial Number:5ra6a1k9

Firmware Version:4.aab

User capacity:160,041,885,696 bytes

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:sat June 7 17:18:02 CST

Smart Support Is:available–device has smart capability.

Here, if you see the smart support is:disabled, it means that smart is not enabled

If we need to execute the following command, start Smart:

The code is as follows:

Smartctl–smart=on–offlineauto=on–saveauto=on/dev/sda

View the current health status of your hard disk using the following command

The code is as follows:

[Root@localhost ~]# smartctl-h/DEV/SDA

Smartctl version 5.38 [I686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen

Home page is http://smartmontools.sourceforge.net/

The code is as follows:

= = START of READ SMART DATA section = =

SMART overall-health Self-Assessment Test result:passed

Notice the result behind results: passed, which indicates that the hard drive is in good health

If failure is shown here, it is best to replace the hard drive to the server immediately.

You can see detailed parameters by executing the following command:

The code is as follows:

[Root@localhost ~]# smartctl-a/DEV/SDA

Smartctl version 5.38 [I686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen

Home page is http://www.3lian.net/

The code is as follows:

= = 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

1 raw_read_error_rate 0x000f 253 006 pre-fail always–0

3 spin_up_time 0x0003 097 097 pre-fail always–0

4 Start_stop_count 0x0032 020 old_age always–818

5 reallocated_sector_ct 0x0033 036 pre-fail always–0

7 seek_error_rate 0x000f 085 060 030 Pre-fail always–369003829

9 power_on_hours 0x0032 084 084 old_age always–14527

Spin_retry_count 0x0013 097 Pre-fail always–0

Power_cycle_count 0x0032 020 old_age always–817

187 Reported_uncorrect 0x0032 Old_age always–0

189 high_fly_writes 0x003a Old_age always–0

190 Airflow_temperature_cel 0x0022 052 046 045 old_age always–48 (Lifetime min/max 47/52)

194 Temperature_celsius 0x0022 048 054 old_age (0 11 0 0)

195 hardware_ecc_recovered 0x001a 074 062 old_age

197 Current_pending_sector 0x0012 Old_age always–0

198 offline_uncorrectable 0x0010 Old_age offline–0

199 Udma_crc_error_count 0x003e Old_age always–0

Multi_zone_error_rate 0x0000 253 old_age offline–0

Ta_increase_count 0x0032 253 old_age always–0

The parameter tables listed above are available for technical analysis and reference, and the following commands allow you to output the full result:

The code is as follows:

Smartctl-a/DEV/SDA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.