In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "linux how to detect hard disk status", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "linux how to detect hard disk status" bar!
It is necessary for every system administrator to check the health of the hard drive regularly. When it comes to the health of the hard drive, we have to talk about S.M.A.R.T. Yes.
SMART is a kind of disk self-analysis and detection technology, which was basically popularized as early as the end of 1990s.
When each hard disk (including IDE, SCSI) is running, it will record several parameters of itself.
These parameters include model, capacity, temperature, density, sector, seek time, transmission, bit error rate, etc.
After thousands of hours of running the hard disk, many internal physical parameters will change.
If a parameter exceeds the alarm threshold, the hard disk is close to damage.
At this time, the hard drive is still working. If the user ignores this alarm, continue to use it.
Then the hard drive will become very unreliable and may fail at any time.
SMART is compatible with the corresponding functions on the motherboard BIOS.
To use SMART, you must first enter the motherboard BIOS settings to start the relevant settings
Generally speaking, motherboards starting from the Pentium2 level support SMART
After BIOS starts, it's a matter at the operating system level.
Unfortunately, Windows does not have built-in SMART-related tools (third-party tools software is required)
Fortunately, SMART support has been available on Linux for a long time.
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 of smart (an error is reported because the hard disk of the vmware virtual machine does not support SMART)
You can use the following command to confirm that the hard drive has SMART support turned on
The code is as follows:
Smartctl-I / dev/sda
Normally, you should 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: 160041885696 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 Jul 7 17:18:02 2012 CST
SMART support is: Available-device has SMART capability.
Here, if you see SMART support is: Disabled, it means SMART is not enabled
Start SMART if we need to execute the following command:
The code is as follows:
Smartctl-smart=on-offlineauto=on-saveauto=on / dev/sda
To check the current health status of the hard drive, use 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
Please note the result after result: PASSED, which indicates that the hard drive is in good health.
If Failure is displayed here, it is best to change the hard drive of the server immediately.
Execute the following command to see the detailed parameters:
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 https://www.yisu.com/
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 RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 253 006 Pre-fail Always-0
3 Spin_Up_Time 0 × 0003 097000 Pre-fail Always-0
4 Start_Stop_Count 0 × 0032 100 100 020 Old_age Always-818
5 Reallocated_Sector_Ct 0 × 0033 100 100 036 Pre-fail Always-0
7 Seek_Error_Rate 0x000f 085 060 030 Pre-fail Always-369003829
9 Power_On_Hours 0 × 0032 084 084 000 Old_age Always-14527
10 Spin_Retry_Count 0 × 0013 100 100 097 Pre-fail Always-0
12 Power_Cycle_Count 0 × 0032 100 100 020 Old_age Always-817
187 Reported_Uncorrect 0 × 0032 100 000 Old_age Always-0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always-0
190 Airflow_Temperature_Cel 0 × 0022 052 046 045 Old_age Always-48 (Lifetime Min/Max 47 super 52)
194 Temperature_Celsius 0 × 0022 048 054000 Old_age Always-48 (0 11 00)
195 Hardware_ECC_Recovered 0x001a 074 062000 Old_age Always-188295533
197 Current_Pending_Sector 0 × 0012 100 000 Old_age Always-0
198 Offline_Uncorrectable 0 × 0010 100 000 Old_age Offline-0
199 UDMA_CRC_Error_Count 0x003e 200000 Old_age Always-0
200 Multi_Zone_Error_Rate 0 × 0000 100 253000 Old_age Offline-0
202 TA_Increase_Count 0 × 0032 100 253000 Old_age Always-0
The parameter table listed above can be used for technical analysis and reference, and the complete results can be output using the following commands:
The code is as follows:
Smartctl-a / dev/sda
Thank you for your reading, the above is the content of "linux how to detect the status of the hard disk". After the study of this article, I believe you have a deeper understanding of how to detect the status of the hard disk with linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.