Verificare status SMART HDD Linux

Configurare noua (How To)

Situatie

Un good practice pentru intretinerea unui sistem este verificarea constanta a HDD-ului. Nu putem avea total incredere in unealta SMART – Self-Monitoring, Analysis, and Reporting Technology, dar ne putem face o idee comparand durata de viata cu “sistem power on time” si “reallocated sector count”.

Solutie

Pasi de urmat

Pentru a instala smartctl pe Linux putem folosi comanda:

sudo apt-get update && sudo apt-get install smartmontools – Debian

sudo dnf install smartmontools – RHEL, CentOS, Fedora

Pentru a verifica statusul SMART si pentru a confirma ca acesta este activ putem folosi comanda:

sudo smartctl -i /dev/sdb – sdx este numele drive-ului

Aveti mai jos un exemplu de output:

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-47-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Mobile HDD
Device Model: ST1000LM035-1RK172
Serial Number: ZDEE5Z4P
LU WWN Device Id: 5 000c50 0b3a92d7a
Firmware Version: RSM7
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 2.5 inches
TRIM Command: Available
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-3 T13/2161-D revision 3b
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Sep 12 10:04:38 2022 EEST
SMART support is: Available – device has SMART capability.
SMART support is: Enabled

  • Daca SMART Support este Available dar nu este Enabled il putem activa cu comanda:

sudo smartctl -s on /dev/sdb

Pentru a verifica raportarile facute de SMART putem folosi comanda:

sudo smartctl -a /dev/sdb

Aveti mai jos elementele importante:

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 0x002f 077 064 006 Pre-fail Always – 51945343
3 Spin_Up_Time 0x0023 099 099 000 Pre-fail Always – 0
4 Start_Stop_Count 0x0032 091 091 000 Old_age Always – 9560
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
7 Seek_Error_Rate 0x002f 084 060 045 Pre-fail Always – 248413861
9 Power_On_Hours 0x0032 084 084 000 Old_age Always – 14174 (86 168 0)
10 Spin_Retry_Count 0x0033 100 100 097 Pre-fail Always – 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always – 588
183 Runtime_Bad_Block 0x0032 098 098 000 Old_age Always – 2
184 End-to-End_Error 0x0033 100 100 097 Pre-fail Always – 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always – 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always – 2
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always – 0
190 Airflow_Temperature_Cel 0x0022 066 047 040 Old_age Always – 34 (Min/Max 31/45)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always – 107
192 Power-Off_Retract_Count 0x0022 100 100 000 Old_age Always – 96
193 Load_Cycle_Count 0x0032 066 066 000 Old_age Always – 69106
194 Temperature_Celsius 0x0022 034 053 000 Old_age Always – 34 (0 5 0 0 0)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always – 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always – 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline – 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always – 0
254 Free_Fall_Sensor 0x0032 100 100 000 Old_age Always – 0

Valorile bold-uite de mai sus daca au orice valoare mai mare ca 0 trebuie sa aveti in vedere schimbarea storage-ului, deoarece este posbil sa aiba probleme software sau hardware.

In output puteti vedea si rubrica cu testele efectuate automat (daca ati avut SMART disable va aparea dupa un timp):

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% 14166 –
# 2 Short offline Completed without error 00% 14160 –
# 3 Short offline Completed without error 00% 14159 –
# 4 Short offline Completed without error 00% 14014 –
# 5 Short offline Completed without error 00% 13998 –
# 6 Short offline Completed without error 00% 13940 –
# 7 Short offline Completed without error 00% 13900 –
# 8 Short offline Completed without error 00% 13829 –
# 9 Short offline Completed without error 00% 13823 –
#10 Short offline Completed without error 00% 13662 –
#11 Short offline Completed without error 00% 13600 –
#12 Short offline Completed without error 00% 13567 –
#13 Short offline Completed without error 00% 13494 –
#14 Short offline Completed without error 00% 13326 –
#15 Short offline Completed without error 00% 13241 –
#16 Short offline Completed without error 00% 13220 –
#17 Short offline Completed without error 00% 13158 –
#18 Short offline Completed without error 00% 13074 –
#19 Short offline Completed without error 00% 12990 –
#20 Short offline Completed without error 00% 12935 –
#21 Short offline Completed without error 00% 12857 –

Tip solutie

Permanent

Voteaza

(7 din 13 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?