Pi + Nextcloud -> No spindown of HDD (wd Blue) /data

Hi,
i am running since months Nextcloud 12.0.3 on my Raspberry Pi 3 B and it works great. I decided to use the external HDD (WD Blue) as NC /data storage. The problem is that the HDD won’t spin down. I use this tutorial and I tried everything but it still won’t spin down. It would be nice if you could help me.

Thank you in advance!

wanna take a look here? --> Spin down USB HDD on Raspberry Pi error

Yep, but there maybe cheap external drives with poor controllers that do not have this.
Though continuous spinning may eat some xtra power it is not necessarily bad for your disk and the disks life time.
Spinning up and down has got it’s own added wear and tear too.
You may wanna check if it is getting hot yes or no as heat is a bigger threat than spinning 24/7.

Thank you for the response. Since the setting (3 days) she continues to spin. Bevor I moved the /data directory to HDD, it was set up like local external drive. At that time the HDD spin down with hdparm after 10 minutes no read and write.

usually, i’d say… well there’s a cronjob running before it would get idle. maybe you’ve set up a 15-min cronjob doing backups or such?

Hi pieter, look at my another comment. The HDD is is perhaps 40 ° C warm. It would spin up and down for max. 3 times a day, because i have only 2 user on NC. When I plug in into my Tower PC the drive spin automaticaly down after 10 seconds.

Thanks, I did not changed anything. If you mean " sudo -uwww-data crontab -e ", then this is the entry: */30 * * * * php -f /var/www/nextcloud/cron.php

Hi Vik, your tower is probably windows… your external does support something at least.
but 40 degrees is not that hot.

Anyway… there is a huge lot on this topic on the web.

https://raspberrypi.stackexchange.com/questions/59279/will-rpi3-power-down-an-external-usb-hard-disk-if-not-used-for-a-certain-amount

https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=188462

and there is a lot more on.

https://www.google.nl/search?q=hdd+spin+down+raspberry+pi&client=firefox-b&dcr=0&source=lnt&tbs=qdr:y&sa=X&ved=0ahUKEwiDwYD0uI7XAhXFSxoKHV-ADDAQpwUIHg&biw=1600&bih=807

what I can find on this topic is look for “hdparm” if your drive is compatible. If not, “hd-idle” may be your thing.

https://en.wikipedia.org/wiki/Hdparm

http://hd-idle.sourceforge.net/

2 Likes

Thank you. I read already everything about that. I don’t know how, but after uninstalling hd-idle and reinstalling hdparm it seems to be solved! Thank you all. Have a nice day!:blush:

Hi all again, after some time I realize that it won’t work correctly so I decided to use this script to shutdown my HDD. With this script it works, but then I realize that it goes to standby only for 1 h and then it spins up. I would like to know why is that happening, which process is wrtiting to the /data directory of nextcloud and why? Because all sync devices at this time were turned off. (@night).

@JimmyKater
@pieter

Here is the log file:
https://pastebin.com/S0p7Qxi7

Thanks in advance!