Comments (8)
@V33m explained exactly how hd-idle behaves in this case.
hd-idle monitors /proc/diskstats
in order to evaluate disk activity. If smartmontools spins up the disk without modifying reads/writes in /proc/diskstats
hd-idle won't notice that change. Therefore hd-idle will only spin down the disk after a change in /proc/diskstats
.
I don't see how to workaround this problem.
from hd-idle.
Adelolmo probably has a better answer, yet I don't think it's possible given how hd-idle detects if a disk is spinning or not. Regardsless, this is a corner case as one does not very often make a smartmoontool report. In addition to that, when you actually use the disk next time afterwards, the internal state will switch and hd-idle will detect when the disk can be spun down. So, the detection issue is only relevant for the period between when the disk is spun up with smartmoontool -x and before you read/write to the disk next time
from hd-idle.
Thank you both - that's a good explanation.
I wonder - would there be overhead/consequences from periodically (say, every configurable X seconds) reissuing the standby command if a disk "should be" spun down according to hd-idle's internal state?
It's not perfect and arguably not particularly elegant, but it would compensate for this edge case.
from hd-idle.
<deleted a comment that muddied the water - created #20 instead>
from hd-idle.
Spinning up/down a hard drive is quite hardware tear problematic when done frequent, and every time you reissue a standby command you either spin up or down the disk, regardless of the disk's previous state. I would highly advice against that. I think I would rather fork smartmoontool, build your own version where you change the code of smartmoontool to do a simple seek at root of the drive when making the report. That would fix this issue as smartmontool will change /proc/diskstats.
Out of curiosity, why do you need to make smartmoontool reports so often? Isn't it enough with one report per harddrive and that's it?
from hd-idle.
You have 2 options regarding smartmontools:
- When you run smartctl from cron for example, include any action which would increase the counters (list directory, use
dd
, ...) - If using smartd to continously monitor the disk state, use smartctl's option "-n STANDBY" which will prevent smartctl/smartd spinning up the disk
from hd-idle.
For most folks hdparm -C would do the job. Sadly no use to me (on QNAP) since there it's compiled with debug on so it writes to syslog and hence to disk (spinning it up)
from hd-idle.
When it's cause by smartd, you can use
/dev/disk/by-id/ -d ignore
before
DEVICESCAN statement
in smartd.conf
to exclude the disk from being queried by smartd
see
https://www.smartmontools.org/ticket/1390#comment:2
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 5
- logfile hard to read - how can we have spindown/spinup log entries? HOT 1
- Deprecated Key? HOT 2
- Raspberry Pi Install Issues & Running Issues HOT 9
- 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.