4

I recently got a LaCie 2TB Thunderbolt bus-powered USB external rugged drive. I am using it with the Raspberry Pi 2 and it works fine. It's being used as a remote backup via rsync.

However, I am use to not leaving a rugged drive powered up all the time. I see no way to power down the LaCie drive when it's not needed for extended periods of time. My experience with self-powered LaCie rugged drives (larger in physical size) is that they run hot to the touch if left on all day even if there is no activity to the drive.

Does the Raspberry Pi 2 put external USB hard disks to sleep after a certain period of inactivity? If so, can this timer(?) be controlled? What is the default?

  • Why don't you use hdparm to control this? – MariusMatutiae Jul 7 '15 at 17:29
  • I'm not familiar with using hdparm. I did a search and couldn't find an example of how you might be referring to use it. How can hdparm be used to put the drive to sleep and then to wake it up? Thanks. – Edward_178118 Jul 7 '15 at 17:44
7

On the Raspberry (I am assuming you use Rasbian), hdparm must be installed,

   sudo apt-get install hdparm

and then you must reboot the RPI in order to allow hdparm to interface itself correctly with udev.

    sudo hdparm -I /dev/sda

will print all of the known characteristics of the device. It is long, and unwieldy, but very thorough.

You are searching for the properties related to Power Management. The ever helpful Arch Linux Wiki says:

-B

Set the Advanced Power Management feature. Possible values are between 1 and 255, low values mean more aggressive power management and higher values mean better performance. Values from 1 to 127 permit spin-down, whereas values from 128 to 254 do not. A value of 255 completely disables the feature.

-S

Set the standby (spindown) timeout for the drive. The timeout specifies how long to wait in idle (with no disk activity) before turning off the motor to save power. The value of 0 disables spindown, the values from 1 to 240 specify multiples of 5 seconds and values from 241 to 251 specify multiples of 30 minutes.

You query the current value of (for instance) B as:

         sudo hdparm -B /dev/sda

and you set it as

         sudo hdparm -B 255 /dev/sda

and likewise for -S.

Once again the ever-helpful states:

Warning: Too aggressive power management can reduce the lifespan of your hard drive due to frequent parking and spindowns.

This should allow you to configure power management to your liking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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