External hard drive won't spin down

External Hard Drive Won't Spin Out

Guys, I was using a Seagate Expansion 4TB external hard drive that was working correctly. It was configured to shut down after 10 minutes using the command hdparm -S 120 /dev/sdc1.

Okay, unfortunately, like all hard drives, it eventually died completely, and this wasn't a problem because I had another 4TB external hard drive, a different model, with the same files, synchronized via rsync...

Well, this new model simply won't shut down after the configured 10 minutes.

The physical differences between the two are that the new one only has a USB 3.0 cable, while the old one had a USB 3.0 cable and a power supply, plus the case is larger...

Despite being a Samsung external hard drive, it came pre-assembled with an internal Seagate drive - lol!

While searching online, I came across some similar cases, not directly in OpenWRT, but in other Linux distributions, where some people reported that it could be something with the UAS "driver," and since I had it installed on OpenWRT, I decided to remove it, but it didn't have the desired effect.

Running the command "lsusb -t", I get the following output:

root@horus:~# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 001: Dev 002, If 0, Class=[unknown], Driver=hub/8p, 480M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 003: Dev 002, If 0, Class=[unknown], Driver=usb-storage, 480M
    |__ Port 004: Dev 003, If 0, Class=[unknown], Driver=usbhid, 12M
    |__ Port 004: Dev 003, If 1, Class=[unknown], Driver=usbhid, 12M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 001: Dev 003, If 0, Class=[unknown], Driver=usb-storage, 5000M
    |__ Port 002: Dev 002, If 0, Class=[unknown], Driver=r8152, 5000M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 001: Dev 002, If 0, Class=[unknown], Driver=hub/6p, 480M
        |__ Port 005: Dev 003, If 0, Class=[unknown], Driver=[none], 12M
        |__ Port 005: Dev 003, If 1, Class=[unknown], Driver=[none], 12M
root@horus:~#

Running the command "smartctl -d sat -a /dev/sdc1", I get the following output:

root@horus:~# smartctl -d sat -a /dev/sdc1
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.119] (localbuild)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Samsung SpinPoint M8U (USB)
Device Model:     ST1000LM025 HN-M101ABB
Serial Number:    <edited>
LU WWN Device Id: 0 000000 000000000
Firmware Version: 2BA30001
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
Device is:        In smartctl database 7.3/5528
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sun Mar 15 21:49:18 2026 -03
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
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:                (13260) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        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:        ( 221) minutes.
SCT capabilities:              (0x003f) 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   051    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0026   252   252   000    Old_age   Always       -       0
  3 Spin_Up_Time            0x0023   090   089   025    Pre-fail  Always       -       3221
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       582
  5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       93
 10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       2
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       373
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       6
192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0002   064   063   000    Old_age   Always       -       35 (Min/Max 20/49)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   252   252   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       20
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       2
225 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       2666

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 0
Note: revision number not 1 implies that no selective self-test has ever been run
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Completed [00% left] (0-65535)
    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

root@horus:~#

Finally, running the command "hdparm -I /dev/sdc" gives me the following output:

root@horus:~# hdparm -I /dev/sdc

/dev/sdc:

ATA device, with non-removable media
        Model Number:       ST1000LM025 HN-M101ABB
        Serial Number:      <edited>
        Firmware Revision:  2BA30001
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
        Used: unknown (minor revision code 0x0028)
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:  1953525168
        Logical  Sector size:                   512 bytes
        Physical Sector size:                  4096 bytes
        Logical Sector-0 offset:                  0 bytes
        device size with M = 1024*1024:      953869 MBytes
        device size with M = 1000*1000:     1000204 MBytes (1000 GB)
        cache/buffer size  = 16384 KBytes
        Form Factor: 2.5 inch
        Nominal Media Rotation Rate: 5400
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = ?
        Advanced power management level: disabled
        Recommended acoustic management value: 254, current value: 0
        DMA: mdma0 mdma1 *mdma2 udma0 udma1 udma2 udma3 udma4 udma5 udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Advanced Power Management feature set
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    64-bit World wide name
           *    IDLE_IMMEDIATE with UNLOAD
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Phy event counters
           *    Idle-Unload when NCQ is active
           *    NCQ priority information
                DMA Setup Auto-Activate optimization
                Device-initiated interface power management
                Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Read/Write Long (AC1), obsolete
           *    SCT Write Same (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        212min for SECURITY ERASE UNIT. 212min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 0000000000000000
        NAA             : 0
        IEEE OUI        : 000000
        Unique ID       : 000000000
Checksum: correct
root@horus:~#

All the commands above were extracted from this website, which has some workarounds, but I tried applying them and was unsuccessful.
So I'm here to ask my friends if there's anything we can do about this.

Best regards to all!

Do you see the same behavior using hd-idle (and luci-app-hd-idle on the web GUI)?

Yes, same situation...

I even uninstalled luci-app-hd-idle to test, thinking there might be a conflict between the applications.

1 Like

That's clearly not an OpenWrt question, but I'm also not entirely sure what we are supposed to do about that. Does the drive react to hdparm -y /dev/sdc1?

Unsurprising. There are only three hard drive manufacturers left in the world, Samsung is not one of them.

I have this error:

root@horus:~# hdparm -y /dev/sdc1

/dev/sdc1:
 issuing standby command
SG_IO: bad/missing sense data, sb[]:  70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
root@horus:~#

That would point to an incomplete/nonstandard USB-SATA implementation in the enclosure. Nothing OpenWrt can do about that.

Edit: At least right now. It is possible that the problem can be mitigated by the kernel driver (example for such a mitigation), but that's a decidedly upstream discussion.

Edit 2: You could, however, re-use the Seagate Expansion enclosure with the "new" hard disk. From own experience, they are generally not half bad USB enclosures. In fact, Seagate Barracuda drives will work better in that enclosure than connected directly to a SATA port (a fact I found out the hard way.)

2 Likes

Yes, I agree with you and I'm evaluating that solution. The big problem is the price of hardware worldwide. I, for example, am in Brazil and everything is quite expensive, mainly due to the problem with memory, I mean, the price of memories.

I'm not entirely sure what the price of memory has to do with swapping drives between their USB enclosures. What am I missing?