6

I have several USB hard drives that have SMART capabilities. I know this, because they work fine on my normal computer. However, the Pi (Model 3B) reports them as not.

After running sudo smartctl -t short /dev/sdc1 and waiting a few minutes:

$ sudo smartctl -a /dev/sdc1
smartctl 6.4 2014-10-07 r4002 [armv7l-linux-4.4.35-v7+] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               WD
Product:              Elements 107C
Revision:             1065
Compliance:           SPC-4
User Capacity:        2,000,365,289,472 bytes [2.00 TB]
Logical block size:   512 bytes
Rotation Rate:        5400 rpm
Form Factor:          3.5 inches
Serial number:        <removed>
Device type:          disk
Local Time is:        Fri Apr 21 19:17:21 2017 AEST
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===

Error Counter logging not supported

No self-tests have been logged

How can I run smartctl on my Raspbian Pi?

I've also attempted making and running the latest version of smartctl (6.5 2016-05-07 r4318), which also fails.

  • Shouldn't you be testing the entire disk/drive instead of a partition? – Dr_Bunsen Apr 20 '17 at 8:10
  • @Dr_Bunsen Possibly? Both /dev/sda and /dev/sda1 give me the same results on my main computer (Arch Linux; smartctl 6.5 2016-05-07 r4318). – Sparhawk Apr 20 '17 at 9:09
  • I just tested it, I get the same results for a partition or the entire device. But I am not sure why it is not working, it should work. Have you tried running the command on the SD carD? – Dr_Bunsen Apr 20 '17 at 15:10
  • @Sparhawk FWIW Arch has a slightly newer version of smartctl. Do you know if the latest version gives SMART info if compiled on the Pi? – Hydraxan14 Apr 20 '17 at 20:34
  • @Dr_Bunsen Do you mean it doesn't work for you either? I haven't tried running it on the SD card. AFAIK SMART is not for SD cards. – Sparhawk Apr 21 '17 at 8:02
2

I'm running an 2,5" SATA disk on an USB hub. The

-d sat

works for me.

sudo smartctl --info /dev/sda -d sat

last lines of output:

SMART support is: Available - device has SMART capability.

SMART support is: Enabled

or

sudo smartctl -a /dev/sda -d sat
  • This is what @Hydraxan14 suggested in the comments. Given they never wrote it up as an answer despite my request, I'll let you "steal" the points. ☺ – Sparhawk Nov 27 '17 at 22:14
0

Works On My Machine

I've got a Seagate USB HDD attached to my RPi2B:

pi@raspberry:~ $ sudo smartctl -t short /dev/sda
smartctl 6.4 2014-10-07 r4002 [armv7l-linux-4.4.38-v7+] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 1 minutes for test to complete.
Test will complete after Thu Apr 20 21:15:40 2017

Use smartctl -X to abort test.
pi@raspberry:~ $ sudo smartctl -a /dev/sda
smartctl 6.4 2014-10-07 r4002 [armv7l-linux-4.4.38-v7+] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Desktop HDD.15
Device Model:     ST4000DM000-1F2168
Serial Number:    REDACTED
LU WWN Device Id: 5 000c50 0754c2829
Firmware Version: CC54
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5900 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Thu Apr 20 21:17:55 2017 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status command failed: scsi error medium or hardware error (serious)
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

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:                (  117) seconds.
Offline data collection
capabilities:                    (0x73) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        No 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:        (   1) minutes.
Extended self-test routine
recommended polling time:        ( 516) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x1085) SCT Status supported.

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   115   099   006    Pre-fail  Always       -       94446904
  3 Spin_Up_Time            0x0003   094   093   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       57
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   066   060   030    Pre-fail  Always       -       3888577
  9 Power_On_Hours          0x0032   080   080   000    Old_age   Always       -       18129
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       57
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   057   048   045    Old_age   Always       -       43 (Min/Max 35/46)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   081   081   000    Old_age   Always       -       39303
194 Temperature_Celsius     0x0022   043   052   000    Old_age   Always       -       43 (0 21 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       2141h+02m+40.053s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       2416612945
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       52356125536

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  Short offline       Completed without error       00%     18129         -

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 SMART Status command failed: scsi error medium or hardware error (serious) message is probably nothing to be worried about, since USB bridges are sometimes buggy.


Edit: I get the exact same output for smartctl -a with my RPi3B.

  • Well, good to know it works for some people, I guess. I just tested again, and it still fails. Perhaps this should be a comment, not an answer? – Sparhawk Apr 21 '17 at 9:52
  • @Sparhawk Maybe, but I couldn't format the output in a comment. Also, I should try this on my raspberry pi 3 b at home after work, just so that we're using the same hardware. – Hydraxan14 Apr 21 '17 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.