USB HDD spindown

Raspberry Pi related support

Re: USB HDD spindown

Postby vezilka » 11 Feb 2016, 03:36

I'm trying to do this but can't get the install hdparm. I get this error: failed retrieving file 'hdparm-9.45-1-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

what could be the issue?
User avatar
vezilka
 
Posts: 2
Joined: 28 Nov 2015, 18:11

Re: USB HDD spindown

Postby hondagx35 » 11 Feb 2016, 10:41

Hi vezilka,

please try:

Code: Select all
pacman -Sy hdparm


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: USB HDD spindown

Postby vezilka » 11 Feb 2016, 23:21

Thank you for your help Frank, that worked for me.
User avatar
vezilka
 
Posts: 2
Joined: 28 Nov 2015, 18:11

Re: USB HDD spindown

Postby Nostromo » 01 Feb 2017, 06:28

Hello,

I have a usb hdd connected to my pi 3 with runeaudio and noticed the hdd was always spinning, which brought me to this thread.

I have managed to install hdparm but I am having trouble getting the settings to stick after a reboot.

You mentioned checking if hdparm.rules is "part of you file". Can someone clarify what that means? What is the code to check if the rules are set up correctly?

Also, I was wondering about the best settings? I have a normal 2.5 5400rpm hdd connected via usb. Should I have APM disabled completely?

Lastly, is there a reason hdd spindown isn't included in runeaudio to begin with. It seems like a normal thing to include in software where people may leave it on but out of use for long periods of time.

Thank you for any help!

Nostromo
Nostromo
 
Posts: 7
Joined: 09 May 2016, 07:57

Re: USB HDD spindown

Postby hondagx35 » 01 Feb 2017, 07:23

Hi nostroma,

You mentioned checking if hdparm.rules is "part of you file". Can someone clarify what that means?

- is this
Code: Select all
/etc/udev/rules.d/50-hdparm.rules

part of your file?


The file "/etc/udev/rules.d/50-hdparm.rules" should only include:
Code: Select all
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -B 255 -S 60 /dev/sda"

and not more.

What is the code to check if the rules are set up correctly?

Code: Select all
hdparm -I /dev/sda | more


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: USB HDD spindown

Postby Nostromo » 02 Feb 2017, 00:45

Thank you for the reply Frank,

It seems I am doing something wrong because the spindown setting still doesn't stay after a reboot. I installed hdparm with

Code: Select all
pacman -Sy hdparm


and it installed just fine.

Then to check if the rules file is there I executed

Code: Select all
/etc/udev/rules.d/50-hdparm.rules


but it says there is no file.

I tried then doing the action code

Code: Select all
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -B 255 -S 60 /dev/sda"


but there is no confirmation or anything and the hdd still doesn't spin down.

If I execute

Code: Select all
hdparm -S 60 /dev/sda


it will set the time and the hdd will spin down but resets back to normal after reboot.

It's like the rules file just isn't there. Do I have to create it or something?

Thank you again for helping an complete noob :)
Nostromo
 
Posts: 7
Joined: 09 May 2016, 07:57

Re: USB HDD spindown

Postby hondagx35 » 02 Feb 2017, 12:42

Hi Nostromo,

hen to check if the rules file is there I executed

Code: Select all
/etc/udev/rules.d/50-hdparm.rules

The file has to be created by you.
Code: Select all
nano /etc/udev/rules.d/50-hdparm.rules

Or you can use a SFTP programm like WinSCP (easier for beginners).

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: USB HDD spindown

Postby Nostromo » 03 Feb 2017, 01:57

Thank you Frank!

That did the trick. My experience with Linux was limited to Ubuntu so this Arch stuff is new to me.

My drive is now properly spinning down after five minutes.

Now to work on a case!

Nostromo
Nostromo
 
Posts: 7
Joined: 09 May 2016, 07:57

support RuneAudio Donate with PayPal

Previous

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 36 guests