Pomoc Jak sprawdzić S.M.A.R.T dla dysku USB podłączonego do NAS

Babolusz

Passing Basics
Beginner
11 Grudzień 2022
14
1
3
34
QNAP
TS-x30
Ethernet
null
Jak sprawdzić status S.M.A.R.T dla dysku zewnętrznego, który jest podłączony na stałe do serwera NAS, tak żeby w czasie rzeczywistym dostać informacje o ewentulanych problemach z dyskiem zewnętrznym? Da się jakoś użyć domyślne oprogramowanie?
 
  • Lubię to
Reakcje: Kong
Czasami się da a czasami nie, zależy co siedzi w kontrolerze usb. U siebie musiałem pokombinować z smartctl aby się dostać do danych ale się udało.
Sprawdź który katalog w /share/ to twój dysk usb (symlink do /share/external/, uruchom mount i poszukaj które urządzenie montuje się w tym katalogu.
Potem kombinujesz z smartctl -a /dev/sdX, czasami trzeba popróbować z parametrem -d
Bash:
[~] # smartctl -d usbprolific -a /dev/sde
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-5.10.60-qnap] (localbuild)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: scsi error unsupported scsi opcode

If this is a USB connected device, look at the various --device=TYPE variants
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
[~] # smartctl -d usbsunplus -a /dev/sde
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-5.10.60-qnap] (localbuild)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     HGST HTS721010A9E630
Serial Number:    JR1004D32TYN2M
LU WWN Device Id: 5 000cca 8c8e78735
Firmware Version: JB0OA3T0
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      2.5 inches
Device is:        Not in smartctl database
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Fri Oct  6 19:23:57 2023 CEST
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:         (   45) seconds.
Offline data collection
capabilities:              (0x51) SMART execute Offline immediate.
                    No Auto Offline data collection support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No 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:      ( 161) minutes.
SCT capabilities:            (0x003d)    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   100   100   062    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0025   100   100   040    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0023   119   100   033    Pre-fail  Always       -       2
  4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       3345
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002f   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   100   100   040    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   047   047   000    Old_age   Always       -       23525
 10 Spin_Retry_Count        0x0033   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1815
183 Runtime_Bad_Block       0x0032   099   099   000    Old_age   Always       -       1
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       588419629056
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       4
190 Airflow_Temperature_Cel 0x0022   076   052   045    Old_age   Always       -       24 (Min/Max 21/45)
191 G-Sense_Error_Rate      0x0032   070   070   000    Old_age   Always       -       7813
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       8847495
193 Load_Cycle_Count        0x0032   075   075   000    Old_age   Always       -       251973
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    0x0036   100   100   000    Old_age   Always       -       0
223 Load_Retry_Count        0x002a   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      5788         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

The above only provides legacy SMART information - try 'smartctl -x' for more

[~] #
 
Mam dodatkowe pytania, jak najszybciej upewnić się jaki jest stan dysku, wystarczy mi informacja że jest OK lub coś się dzieje. Chce potem dostawać taką informacje mailowo. Na tym się skupić "SMART overall-health self-assessment test result: PASSED"?
 
@Silas Mariusz, przerobiłem naście wątków odnośnie S.M.A.R.T i informacji w jaki sposób interpretować wyniki testów, co do samych atrybutów nie mam wątpliwości bo jest to dość jasno określone. Natomiast nadal mam wątpliwość gdzie znajdę KRÓTKĄ i WIARYGODNĄ informacji czy dysk jest OK albo COŚ jest nie tak. Oczywiście po ogólnej informacji będę głębiej dociekał, który z atrybutów jest nie OK. Reasumując: gdzie znajdę informacje czy stan dysku jest OK albo nie OK (nie chodzi o poszczególne atrybutów).
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. Smart
  2. Error code: -22
  3. jaki hdd