Giter VIP home page Giter VIP logo

Comments (15)

adelolmo avatar adelolmo commented on September 27, 2024 1

As an update: I managed to install a arm64 version of ubuntu and I reproduced the error.
Now I "only" have to fix it.

from hd-idle.

adelolmo avatar adelolmo commented on September 27, 2024 1

I've added an entry in the readme to this wiki topic.

from hd-idle.

V33m avatar V33m commented on September 27, 2024

I can confirm that the issue is related to ata, since scsi works fine as seen below.

$ sudo systemctl status hd-idle
* hd-idle.service - hd-idle - spin down idle hard disks
   Loaded: loaded (/lib/systemd/system/hd-idle.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-09-10 11:55:51 CEST; 3min 32s ago
     Docs: man:hd-idle(8)
 Main PID: 2109 (hd-idle)
    Tasks: 5 (limit: 3350)
   Memory: 4.7M
   CGroup: /system.slice/hd-idle.service
           `-2109 /usr/sbin/hd-idle -i 0 -a /dev/disk/by-id/ata-ST6000DM003-2CY186_WF306G8F -i 180

Sep 10 11:55:51 hostname systemd[1]: Started hd-idle - spin down idle hard disks.
Sep 10 11:55:51 hostname hd-idle[2109]: symlinkPolicy=0, defaultIdle=0, defaultCommand=scsi, debug=false, devices=[{sda /dev/disk/by-id/ata-ST6000DM003-ID 180 scsi}], logFile=
Sep 10 11:59:19 hostname hd-idle[2109]: sda spindown

This is not something that bother me as everything actually seems to be fine with scsi πŸ‘

$ sudo systemctl status hd-idle
* hd-idle.service - hd-idle - spin down idle hard disks
   Loaded: loaded (/lib/systemd/system/hd-idle.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-09-10 12:09:02 CEST; 3min 21s ago
     Docs: man:hd-idle(8)
 Main PID: 2345 (hd-idle)
    Tasks: 5 (limit: 3350)
   Memory: 4.7M
   CGroup: /system.slice/hd-idle.service
           `-2345 /usr/sbin/hd-idle -i 0 -s 0 -l /var/log/hd-idle.log -a /dev/disk/by-id/ata-ST4000DM004-ID -i 180 -a /dev/disk/by-id/ata-ST6000DM003-ID -i 120

Sep 10 12:09:02 hostname systemd[1]: Started hd-idle - spin down idle hard disks.
Sep 10 12:09:02 hostname hd-idle[2345]: symlinkPolicy=0, defaultIdle=0, defaultCommand=scsi, debug=false, devices=[{sdc /dev/disk/by-id/ata-ST4000DM004-ID 180 scsi} {sda /dev/disk/by-id/ata-ST6000DM003-ID 120 scsi}], logFile=/var/log/hd-idle.log
Sep 10 12:11:24 hostname hd-idle[2345]: sda spindown
Sep 10 12:12:16 hostname hd-idle[2345]: sdc spindown

from hd-idle.

V33m avatar V33m commented on September 27, 2024

I was hoping that everything was fine, but it seems that my HDDs spinup without hd-idle noticing and won't get spun down until it recognises that example I play a video from a HDD.

From systemctl status hd-idle

Sep 10 18:01:29 hostname hd-idle[4875]: sdb spindown
Sep 10 18:01:30 hostname hd-idle[4875]: sda spindown

But the HDDs are actually not standby as seen below.

$ sudo smartctl -i -n standby /dev/disk/by-id/ata-ST4000DM004-ID
smartctl 6.6 2017-11-05 r4594  (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

Device is in SLEEP mode, exit(2)
$ sudo smartctl -i -n standby /dev/disk/by-id/ata-ST6000DM003-ID
smartctl 6.6 2017-11-05 r4594  (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
...
...
...
SMART support is: Enabled
Power mode was:   IDLE_B

Update

I installed the armhf package instead of the arm64 and now everything is back to normal. So it seems that the arm64 package has issues related to the use of ata.

from hd-idle.

adelolmo avatar adelolmo commented on September 27, 2024

Hi @V33m

I agree with you on blaming the arm64 package. I cross compiled from my x86_64 desktop to create all the packages (amd64, i386, armhf and arm64). Weird that the arm64 failed but not the armhf.
Sadly I don't have any arm64 hardware where I can test. I guess I should start considering getting one.
On what hardware are you running?

from hd-idle.

V33m avatar V33m commented on September 27, 2024

Khadas VIM3, however, there are other great arm64 SBCs to choose as example Raspberry Pi 4 Model B, ODROID-N2 etc.

from hd-idle.

V33m avatar V33m commented on September 27, 2024

Sadly I don't have any arm64 hardware where I can test. I guess I should start considering getting one.

Have you had any time to look into arm64? If you have done any changes which you think have sorted the issue, let me know so I can give it a try πŸ‘

from hd-idle.

adelolmo avatar adelolmo commented on September 27, 2024

I got a raspberry 4 but I didn't manage to get a 64bit linux on it yet. The pi is always headless and I have no way to debug when ssh is not built in.
I keep trying every now and then with different options.

The 1.8 release has better error handling, but it won't solve the arm64 issue anyway. So no real need for trying it out.

from hd-idle.

V33m avatar V33m commented on September 27, 2024

Which OSes have you tried? I don't have a RPi4, but you should give the following a try:

I've never had any RPis, but no ssh built in sounds odd for me.. Most of my arm SBCs are headless, so built in ssh has always been a requirement to use a OS for me. Let me know when you want to do some testing down the road.. πŸ‘

from hd-idle.

adelolmo avatar adelolmo commented on September 27, 2024

So far I don't have any good news.
I based the ata sgio command on hdparm's implementation. I ran the command sudo hdparm -S 10 /dev/sda to see if it works on arm64 and got the following error:

/dev/sda:
 setting standby to 10 (50 seconds)
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

This is exactly the same error hd-idle throws.

So I will have to re-think (online research) the whole ata sgio command for arm64 :(

from hd-idle.

V33m avatar V33m commented on September 27, 2024

Yeah, we probably have to do some online research to figure this out. The positive aspect of hdparm having the same issue is that we can report it and ask for input. Which version of hdparm did you test? 9.58+ds-1? 9.58+ds-4? The maintainer is Alexandre Mestiashvili as seen from the patch notes: Debian changelogs and Ubuntu changelogs.

A quick google search didn't give me too more, yet this thead could be a start - https://askubuntu.com/questions/768373/hard-drive-error-bad-missing-sense-data

from hd-idle.

adelolmo avatar adelolmo commented on September 27, 2024

After some digging I ended up in, what it looks, the description of this problem and how to solve it: SAT-with-UAS-Linux
It is an interesting reading but the TL;DR is: ATA commands might not work if UAS is enable.

I was able to solve it following the manual.
@V33m Please let me know if it works for you too.

from hd-idle.

V33m avatar V33m commented on September 27, 2024

Glad to hear that! Did you disable UAS or overwrite SAT detection for the drive? Which arm64 device do you have, Rpi4?

from hd-idle.

adelolmo avatar adelolmo commented on September 27, 2024

I temporary disable UAS.

cat /sys/module/usb_storage/parameters/quirks
2109:0711:u

I used Rpi4 with Ubuntu arm64.

from hd-idle.

V33m avatar V33m commented on September 27, 2024

I'm thinking about the same, given the decrease in write/read speed is not an issue for me as none of the drives are SSD. I consider the issue fixed and one should probably mention it in the README

from hd-idle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.