Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


USB drive not going to sleep
#7
(09-02-2020, 12:26 PM)vinnn Wrote: Indeed I was wrong, that's what I get by relying on memory alone before I've had coffee. You can change some drive configuration with smartctl, just not spin down time, apologies.
Looks like a drive's spin down is set by using hdparm, installable on your Pi by installing the hdparm package.

Then with hdparm you can set the drive's spin-down in seconds with the S option, e.g.

Code:
sudo hdparm -S 600 /dev/sda

... assuming your USB disk is /dev/sda of course, to determine the device for your disk you can list block devices with lsblk.

THIS is the perfect solution! Worked like a charm. 

I used this to get the drive to sleep after 2 minutes:
Code:
sudo hdparm -S 24 /dev/sda2

Note that it is 5 seconds per unit… as mentioned here.

Quote:-S
Paramétrer le temps mort du stand-by de périphérique.

Usage :
  • 0 : désactive ; le périphérique ne rentrera pas en mode stand-by.
  • De 1 à 240 : spécifie des multiples de 5 secondes, avec des temps morts de 5 secondes à 20 minutes.
  • De 241 à 251 : spécifie de 1 à 11 unités de temps de 30 minutes chacune, avec des temps morts de 30 minutes à 5 h 30.
  • 252 : spécifie un temps mort de 21 minutes.
  • 253 : est une période de temps mort définie par le fabriquant, entre 8 à 12 heures.
  • 254 : réservée !
  • 255 : est interprétée comme 21 minutes plus 15 secondes.
Thanks a lot for your help vinnn!
Reply


Messages In This Thread
USB drive not going to sleep - by Capso - 09-02-2020, 08:02 AM
RE: USB drive not going to sleep - by vinnn - 09-02-2020, 08:13 AM
RE: USB drive not going to sleep - by Capso - 09-02-2020, 08:19 AM
RE: USB drive not going to sleep - by vinnn - 09-02-2020, 08:23 AM
RE: USB drive not going to sleep - by Capso - 09-02-2020, 11:57 AM
RE: USB drive not going to sleep - by vinnn - 09-02-2020, 12:26 PM
RE: USB drive not going to sleep - by Capso - 09-02-2020, 01:20 PM

Forum Jump: