thomask77 / raid-sleep Goto Github PK
View Code? Open in Web Editor NEWPower down RAID disks after a specified timeout
License: GNU General Public License v3.0
Power down RAID disks after a specified timeout
License: GNU General Public License v3.0
Hello Thomas,
i'm using your tool on my tiny self-made nas. It worked very well, until i did a upgrade to bullseye. I'm not sure if only the update causes the issue, but i did not changed much.
The tool began to spinup the disks immediately after spindown. So i got a spindown/spinup loop on every timeout-cycle. I checked /proc/disktats and i could watch diskstats changing while hdparm did the spindown. I could not figure out, what service/tool did the access, maybe its my mdraid.
I build a simple workaround to prevent the spindown/spinup loop by simply adding a spinup delay to your code. Every time the tool detects a spinup event (on disktat change), it checks if the spindown was performed within the configured delaytime (defaulting to 3 secs, which seems to be enough) and skips any action in this case.
It contionously get the stats, so after this delay time it will check again if disktstats changed.
I'm not sure if it is good fix, but maybe other people have the same issue and can get helped with this
regards
Andreas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.