Comments (15)
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.
I've added an entry in the readme to this wiki topic.
from hd-idle.
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.
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.
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.
Khadas VIM3, however, there are other great arm64 SBCs to choose as example Raspberry Pi 4 Model B, ODROID-N2 etc.
from hd-idle.
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.
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.
Which OSes have you tried? I don't have a RPi4, but you should give the following a try:
- Balena
- Gentoo
- Manjaro (Arch)
- Raspbian with 64-bit kernel (32-bit userland)
- Ubuntu MATE 18.04.2 (Bionic)
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.
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.
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.
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.
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.
I temporary disable UAS.
cat /sys/module/usb_storage/parameters/quirks
2109:0711:u
I used Rpi4 with Ubuntu arm64.
from hd-idle.
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)
- Question. Don't start HDD after suspend and sleep HDD on standby HOT 1
- HDD in external bay not detected anymore HOT 3
- Question / Clarification: How does hd-idle parse options (disks vs. partitions, LUKS, precedence in case of contradictions) HOT 1
- Help understanding how to use the -p power_condition flag for SAS drives HOT 15
- WD Re HDD over USB does not spin down. HOT 23
- Can't spin down my internal WD Blue HDD HOT 5
- HD-Idle command does not seem to get set? HOT 4
- Drive standby instead of sleep. HOT 2
- Logfile won't be generate dataγ HOT 5
- Hook-function to be called after spinning down HOT 2
- Spin up not recognized HOT 2
- Disk spin down not working after scheduled S.M.A.R.T test
- hd-idle task gets out of sync with real disk spindown HOT 11
- logfile hard to read - how can we have spindown/spinup log entries? HOT 1
- Deprecated Key? HOT 2
- RFE/RFC: hd-idle extensibility: add option for a state file HOT 6
- Feature: Flag for script after spin up HOT 4
- Possible to spin-down based on Schedule? HOT 3
- Logfile won't be created HOT 4
- Nothing after hd-idle command HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hd-idle.