Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

Suspend external usb-disk

$
0
0
Hi forum!

I am quite new to Linux and played around on my Laptop with Linux Mint and recently I got a thin client for Plex, AdGuard, etc with CasaOS on Debian 12. This is the device I am talking about: Dell Wyse 5070. Installing Debian and CasaOS was pretty easy and I even managed basic things like installing packages via command line (I didn´t installed any xserver). I also attached an external harddrive via USB as NAS and storage for Plex. Seagate STGY8000400. But then I noticed, that it is continously spinning and not going into any suspend mode.

I was following this great thread/post: viewtopic.php?p=743326#p743326 and I figured out, that my issues looked the same, but I don't understand the solution. I was able to reproduce most of the steps and I finally managed to communicate with the drive the same way IcIoNViO did on his post by adding my drive to quirks via the grub-menu (same link as in his linked post: https://www.smartmontools.org/wiki/SAT- ... agSettings).

I also managed to install smartd (quite proud as a bloody beginner ;-)) and figured out my drives vendor- and product-id with lsusb. Now I can use smartctl to get details from my disk. But the next step, executing

Code:

hdparm -B 127 /dev/sdb2
failed with

Code:

setting Advanced Power Management level to 0x7f (127)HDIO_DRIVE_CMD failed: Input/output errorAPM_level      = not supported
I am totally honest: I don't know what usb_storage.quirks, NO_ATA_1X and UAS is and I have no idea how to continue. Google didn' helped me. Here are some outputs from smartctl and hdparm

Code:

ben@BenHomeserver:~$ sudo smartctl -d sat -a /dev/sdb2smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-26-amd64] (local build)Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org=== START OF INFORMATION SECTION ===Model Family:     Seagate IronWolfDevice Model:     ST8000VN002-2ZM188Serial Number:    ZPV0R2Y1LU WWN Device Id: 5 000c50 0e94780ffFirmware Version: SC60User Capacity:    8.001.563.222.016 bytes [8,00 TB]Sector Sizes:     512 bytes logical, 4096 bytes physicalRotation Rate:    5400 rpmForm Factor:      3.5 inchesDevice is:        In smartctl database 7.3/5319ATA Version is:   ACS-3 T13/2161-D revision 5SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)Local Time is:    Thu Oct 24 18:42:29 2024 CESTSMART support is: Available - device has SMART capability.SMART support is: Enabled=== START OF READ SMART DATA SECTION ===SMART overall-health self-assessment test result: PASSEDGeneral 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 Offlinedata collection:                (    0) seconds.Offline data collectioncapabilities:                    (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 routinerecommended polling time:        (   1) minutes.Extended self-test routinerecommended polling time:        ( 880) minutes.Conveyance self-test routinerecommended polling time:        (   2) minutes.SCT capabilities:              (0x70bd) SCT Status supported.                                        SCT Error Recovery Control supported.                                        SCT Feature Control supported.                                        SCT Data Table supported.SMART Attributes Data Structure revision number: 10Vendor Specific SMART Attributes with Thresholds:ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE  1 Raw_Read_Error_Rate     0x000f   079   066   006    Pre-fail  Always       -       75516802  3 Spin_Up_Time            0x0003   093   093   000    Pre-fail  Always       -       0  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       18  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0  7 Seek_Error_Rate         0x000f   067   060   045    Pre-fail  Always       -       4893098  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       71 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       18183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0190 Airflow_Temperature_Cel 0x0022   076   046   040    Old_age   Always       -       24 (Min/Max 22/24)191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       16193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       38194 Temperature_Celsius     0x0022   024   054   000    Old_age   Always       -       24 (0 21 0 0 0)195 Hardware_ECC_Recovered  0x001a   079   066   000    Old_age   Always       -       75516802197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       34h+54m+14.104s241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       17883331298242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       134999722SMART Error Log Version: 1No Errors LoggedSMART Self-test log structure revision number 1No self-tests have been logged.  [To run self-tests, use: smartctl -t]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_testingSelective 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.
and

Code:

ben@BenHomeserver:~$ sudo hdparm -I /dev/sdb2/dev/sdb2:ATA device, with non-removable media        Model Number:       ST8000VN002-2ZM188        Serial Number:      ZPV0R2Y1        Firmware Revision:  SC60        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0Standards:        Used: unknown (minor revision code 0x006d)        Supported: 10 9 8 7 6 5        Likely used: 10Configuration:        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: 15628053168        Logical  Sector size:                   512 bytes        Physical Sector size:                  4096 bytes        Logical Sector-0 offset:                  0 bytes        device size with M = 1024*1024:     7630885 MBytes        device size with M = 1000*1000:     8001563 MBytes (8001 GB)        cache/buffer size  = unknown        Form Factor: 3.5 inch        Nominal Media Rotation Rate: 5400Capabilities:        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 = 16        Recommended acoustic management value: 128, current value: 128        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=120nsCommands/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           *    DOWNLOAD_MICROCODE                Power-Up In Standby feature set           *    SET_FEATURES required to spinup after power up                SET_MAX security extension           *    48-bit Address feature set           *    Device Configuration Overlay feature set           *    Mandatory FLUSH_CACHE           *    FLUSH_CACHE_EXT           *    SMART error logging           *    SMART self-test           *    Media Card Pass-Through           *    General Purpose Logging feature set           *    64-bit World wide name           *    WRITE_UNCORRECTABLE_EXT command           *    {READ,WRITE}_DMA_EXT_GPL commands           *    Segmented DOWNLOAD_MICROCODE                unknown 119[6]           *    unknown 119[7]           *    Gen1 signaling speed (1.5Gb/s)           *    Gen2 signaling speed (3.0Gb/s)           *    Gen3 signaling speed (6.0Gb/s)           *    Native Command Queueing (NCQ)           *    Phy event counters           *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT                DMA Setup Auto-Activate optimization                Device-initiated interface power management           *    Software settings preservation                unknown 78[7]           *    SMART Command Transport (SCT) feature set           *    SCT Write Same (AC2)           *    SCT Error Recovery Control (AC3)           *    SCT Features Control (AC4)           *    SCT Data Tables (AC5)                unknown 206[7]                unknown 206[12] (vendor specific)                unknown 206[13] (vendor specific)                unknown 206[14] (vendor specific)           *    DOWNLOAD MICROCODE DMA commandSecurity:        Master password revision code = 65534                supported        not     enabled        not     locked        not     frozen        not     expired: security count                supported: enhanced erase        882min for SECURITY ERASE UNIT. 882min for ENHANCED SECURITY ERASE UNIT.Logical Unit WWN Device Identifier: 5000c500e94780ff        NAA             : 5        IEEE OUI        : 000c50        Unique ID       : 0e94780ffChecksum: correct
Can anyone help me to solve this like IcIoNViO did (or show another way). I really want my drive go to sleep when it's not in use...

Statistics: Posted by FatalDiskError — 2024-11-05 17:02 — Replies 1 — Views 75



Viewing all articles
Browse latest Browse all 3474

Trending Articles