nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

HDD Spindown Control

Open JellyFisch opened this issue 5 years ago • 10 comments

( 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 }

JellyFisch avatar Jul 27 '20 10:07 JellyFisch

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.

ovpc avatar Aug 13 '20 05:08 ovpc

Is this not a duplicate of https://github.com/nextcloud/nextcloudpi/issues/1145 ?

svenb1234 avatar Sep 06 '20 05:09 svenb1234

+1

dffvb avatar Oct 29 '20 10:10 dffvb

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

Tesch1933 avatar Apr 25 '21 15:04 Tesch1933

+1

WeiChihChern avatar Oct 26 '21 18:10 WeiChihChern

I am using hd-idle for this. Works great

dotlineX avatar Jan 22 '22 11:01 dotlineX

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

WeiChihChern avatar Jan 22 '22 15:01 WeiChihChern

@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.

dotlineX avatar Jan 24 '22 10:01 dotlineX

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

WeiChihChern avatar Jan 24 '22 13:01 WeiChihChern

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.

steviehs avatar Jul 25 '22 14:07 steviehs