Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDD Spindown Control #1161

Open
JellyFisch opened this issue Jul 27, 2020 · 10 comments
Open

HDD Spindown Control #1161

JellyFisch opened this issue Jul 27, 2020 · 10 comments

Comments

@JellyFisch
Copy link

( sorry it is my first created ticket be lenient i am open for constructive criticism )

Can you add the possibility to configure a scheduled HDD Spindown
The Benefits:

-reduce noise
-reduce energy consumption
-increases disk life time

Example
one Tool is hdparm ( there are 2 other programs known to me that can do this hd-idle and sdparm )

edit the configuration file to make hdparm configuration permanent

sudo nano /etc/hdparm.conf

The spindown_time value is multiplied by 5 and you have the total time in seconds. So a value of 120 yields 10 minutes (120*5=600).

sample Entry:

/dev/sda {
write_cache = on
spindown_time = 120
}

@ovpc
Copy link
Collaborator

ovpc commented Aug 13, 2020

We have no manpower to investigate or implement this, so unless you are going to create a PR yourself. Also I do not see anyone else seconding this feature request.

@svenb1234
Copy link

Is this not a duplicate of #1145 ?

@dffvb
Copy link

dffvb commented Oct 29, 2020

+1

@Tesch1933
Copy link

I also think a spindown function would be very useful. Especially for everyone. who do not access their Nextcloud every day.

@WeiChihChern
Copy link

+1

@dotlineX
Copy link

I am using hd-idle for this. Works great

@WeiChihChern
Copy link

@dotlineX Would you please elaborate on how to use it with Nextcloud? Thanks

@dotlineX
Copy link

@dotlineX Would you please elaborate on how to use it with Nextcloud? Thanks

Of course! However, I don't remember exactly how I set it up but it was very basic.
As far as I know, it is a systemctl service running in the background that checks for disk activity. In my setup, if it hasn't seen any activity for 600 seconds (default, I think) it spins down the drive. The moment you (or nextcloud or any other service) tries to access it, the drive spins up again.

It's a very basic tool to be honest. The config file is in /etc/default/hd-idle. It can also log spinup and spindown times.

I hope that helps.

@WeiChihChern
Copy link

@dotlineX Thank you for the explanation. Will look into it!

@steviehs
Copy link

using hd-idle is from what I know also the most efficient way to spin down a hdd as hdparm is not supported by all disks (I remember some wd drives). funny enough hdparm still works sometimes to detect the state of a drive.
The biggest PITA in that situation are USB3 HDDs which do not support spin down at all...
I have added support for hd-idle in https://gitlab.com/syncosync/syncosync/-/blob/master/src/soscore/drivemanager.py maybe this would help making a pr here?
For getting the quite cheap and low powered Seagate Expansion 2.5" USB Drive to work, adding
sed -i '$s/$/ usb-storage.quirks=0bc2:ac25:/' /boot/cmdline.txt
is necessary on the RPi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

9 participants