Smartctl: Difference between revisions
No edit summary |
|||
Line 79: | Line 79: | ||
|- | |- | ||
|'''Reallocated_Sector_Ct''' | |'''Reallocated_Sector_Ct''' | ||
|Specifies the number of sectors reassigned due to read errors. If a sector can no longer be read, written to or checked correctly, a replacement sector is automatically assigned to it. The faulty sector is permanently marked as unreadable. This is a clear warning sign for incipient surface problems. | |Specifies the number of sectors reassigned due to read errors. If a sector can no longer be read, written to or checked correctly, a replacement sector is automatically assigned to it. The faulty sector is permanently marked as unreadable. This is a clear warning sign for incipient surface problems. If this value is not equal to zero, a hard drive failure is often imminent. This value is the most important indicator for a hard drive replacement | ||
If this value is not equal to zero, a hard drive failure is often imminent. This value is the most important indicator for a hard drive replacement | |||
|- | |- | ||
|'''Current_Pending_Sector_Ct''' | |'''Current_Pending_Sector_Ct''' | ||
|Specifies the number of unstable sectors waiting for remapping. If a sector cannot be read and written correctly, it first receives the status Current Pending Sector. The sector is not reassigned in this state, since the data in the sector are unknown. Only after several unsuccessful read or write attempts is a replacement sector assigned and the faulty sector is permanently marked as unreadable. | |Specifies the number of unstable sectors waiting for remapping. If a sector cannot be read and written correctly, it first receives the status Current Pending Sector. The sector is not reassigned in this state, since the data in the sector are unknown. Only after several unsuccessful read or write attempts is a replacement sector assigned and the faulty sector is permanently marked as unreadable. The value Current_Pending_Sector_Ct is an important indicator for a hard drive replacement. | ||
The value Current_Pending_Sector_Ct is an important indicator for a hard drive replacement. | |||
If this value is not equal to zero, a hard drive failure is often imminent | If this value is not equal to zero, a hard drive failure is often imminent | ||
|- | |- | ||
|'''Offline_Uncorrectable''' | |'''Offline_Uncorrectable''' | ||
|Specifies the number of uncorrectable write and read sector errors. | |Specifies the number of uncorrectable write and read sector errors. | ||
The last section deals with the internal hard drive log. Errors are recorded here if the server's work orders have not been processed correctly by the hard drive. | The last section deals with the internal hard drive log. Errors are recorded here if the server's work orders have not been processed correctly by the hard drive. If the number of errors in this section is at least two digits, you should replace the hard drive as soon as possible | ||
If the number of errors in this section is at least two digits, you should replace the hard drive as soon as possible | |||
|} | |} | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> |
Revision as of 13:20, 10 December 2023
smartmontools.org supports the smartctl Command Line Tool of Smartmontoolsis primarily used to query SMART attributes of hard drives and SSDs.[1]
Recently, Alexander Shaduri released a graphical user interface for smartctl called as GSmartControl[2] available for Linux, FreeBSD, MacOS X and Windows.
Check RAID array list
can display which disks of the RAID controller are accessible.
cat /proc/scsi/scsi
smartctl over LSI array
smartctl provides integrated support for MegaRAID controller
sudo smartctl -a -d megaraid,N /dev/sdX
Where <N> stands for the device ID on the RAID controller. These can be displayed via the StorCLI (column DID).
sudo storcli /c0 /eall /sall show
Creating a SMART Log[3]
Manufacturer | Hard disk | Command |
---|---|---|
ARECA | 1 | smartctl -x /dev/sg1 -d areca,1 |
ARECA | 2 | smartctl -x /dev/sg1 -d areca,2 |
LSI / 3Ware | 1 | smartctl -x /dev/twe0 -d 3ware,0 |
LSI / 3Ware | 2 | smartctl -x /dev/twe0 -d 3ware,1 |
Adaptec | 1 | smartctl -x /dev/sg2 -d sat |
Adaptec | 2 | smartctl -x /dev/sg3 -d sat |
Adaptec | (3) | smartctl -x /dev/sg4 -d sat |
Adaptec | (4) | smartctl -x /dev/sg5 -d sat |
Dell | 1 | smartctl –x -d sat+megaraid,0 /dev/sda |
Dell | 2 | smartctl –x -d sat+megaraid,1 /dev/sda |
Broadcom | 1 | smartctl –x -d sat+megaraid,0 /dev/sda |
Broadcom | 2 | smartctl –x -d sat+megaraid,1 /dev/sda |
Identify a defective hard drive
- Check "START OF READ SMART DATA SECTION" from smartctl. If the value Failed or UNKNOWN is displayed instead of the value PASSED, you should replace the hard drive as soon as possible
- Check "Vendor Specific SMART Attributes with Thresholds", The following parameters can indicate an imminent hard drive failure before a SMART warning is displayed.
Attribute name | Description |
---|---|
Reallocated_Sector_Ct | Specifies the number of sectors reassigned due to read errors. If a sector can no longer be read, written to or checked correctly, a replacement sector is automatically assigned to it. The faulty sector is permanently marked as unreadable. This is a clear warning sign for incipient surface problems. If this value is not equal to zero, a hard drive failure is often imminent. This value is the most important indicator for a hard drive replacement |
Current_Pending_Sector_Ct | Specifies the number of unstable sectors waiting for remapping. If a sector cannot be read and written correctly, it first receives the status Current Pending Sector. The sector is not reassigned in this state, since the data in the sector are unknown. Only after several unsuccessful read or write attempts is a replacement sector assigned and the faulty sector is permanently marked as unreadable. The value Current_Pending_Sector_Ct is an important indicator for a hard drive replacement.
If this value is not equal to zero, a hard drive failure is often imminent |
Offline_Uncorrectable | Specifies the number of uncorrectable write and read sector errors.
The last section deals with the internal hard drive log. Errors are recorded here if the server's work orders have not been processed correctly by the hard drive. If the number of errors in this section is at least two digits, you should replace the hard drive as soon as possible |
#smartctl example output
$ sudo smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-164-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD40EFRX-68WT0N0
Serial Number: WD-WCC4E7JN0YCY
LU WWN Device Id: 5 0014ee 262e50378
Firmware Version: 82.00A82
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Dec 10 13:01:01 2023 KST
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: (0x00) Offline data collection activity
was never started.
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: (51540) 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: ( 515) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x703d) 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 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 182 182 021 Pre-fail Always - 7875
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 22
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 069 068 000 Old_age Always - 22749
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 22
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 11
193 Load_Cycle_Count 0x0032 180 180 000 Old_age Always - 60592
194 Temperature_Celsius 0x0022 117 105 000 Old_age Always - 35
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0