5

I use raspbian and am looking for a way to connect an ~old seagate 500GB usb (externally powered) hard drive so I can store my movies etc on it.

But obviously, there may be large amounts of time when it is not in use, so I'd like to make it check to see if it is in use (say every hour or so) and if it isn't, spin down.

I've looked at this but I'm a ~raspbian/linux noob and would appreciate any advice!

3
  • It should or the OS should spin it down after a relatively short time anyway. It is usually easy to tell just by looking, so unless you notice it not behaving this way, implementing a check is probably not worthwhile. I haven't had to do anything special with the pi to keep an external harddrive appropriately sleepy.
    – goldilocks
    Commented Mar 1, 2014 at 18:19
  • I think I read somewhere the power management tools are disabled or not installed in default Raspbian. Or the default value is not to spin down.
    – Piotr Kula
    Commented Mar 1, 2014 at 18:57
  • So how do I change that? Commented Mar 2, 2014 at 12:32

1 Answer 1

2

Usb power management is disabled in the default raspbian kernel but the device might still support it...

try sudo hdparm -S 10 /dev/sda -> spindown after 10*5 seconds.
or sudo udisks --set-spindown /dev/sda --spindown-timeout 20
replace /dev/sdawith your device.

you might need to install hdparm or udisk like this (both in that example):
apt-get -y update && apt-get -y install udisks hdparm

If you need usb power management support in the kernel you probably have to build it yourself, but its possible that there is a good reason why it was disabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.