0

I’ve just used a Pi 3 B+ and a Seagate 2TB external USB hard drive (SRD00F2) to make a home media server using OpenMediaVault.

The drive light is on all the time, even when I’m not accessing the drive. Does this mean the drive is still spinning (wasting energy)? Is there a way to get the Pi to power down the drive when it’s not in use? I want to leave the Pi running 24/7 but I’d like it to be energy-efficient/quiet.

Thank you.

2
1

As you & @GramThanos discussed in comments, the original hd-idle may be capable of improving your drive's energy efficiency. However, it was last updated in April, 2014, which suggests it has been orphaned by its author. If you want an open-source solution that is more current, the hd-idle distro on GitHub is claimed by its author/maintainer to offer "Extra features", and from its "star count", it appears to be well-received by its users.

I've not tried hd-idle myself, so I can't say if the armhf.deb binary will work with RPi - or whether building from source is necessary. However, like most GitHub repos, you can get support through the Issues tab.

Another option is to grab one of Seagate's "SeaTools" from their website - at least some of them are available in a "Linux" version.

But perhaps the first thing to try is the hdparm tool as discussed in this U&L SE Q&A. hdparm is in the RPi repository, and may be installed as follows:

# make sure it's available:
$ apt-cache search hdparm
blktool - tune low-level block device parameters
hdparm - tune hard disk parameters for high performance 

# install in the usual way using apt: 
sudo apt-get update
sudo apt-get full-upgrade 
sudo apt-get install hdparm

It seems there are several hd-idle-inspired tools available that can reduce energy consumption. If you follow up on this, please consider posting your own answer, and share your results; I, for one, am always interested in energy-saving ideas for my off-grid projects.

1

Add hdparm -S 240 -B 127 -K 1 /dev/sda to your startup script:

-B

Query/set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better performance. Possible settings range from values 1 through 127 (which permit spin-down), and values 128 through 254 (which do not permit spin-down). The highest degree of power management is attained with a setting of 1, and the highest I/O performance with a setting of 254. A value of 255 tells hdparm to disable Advanced Power Management altogether on the drive (not all drives support disabling it, but most do).

-K

Set the drive's keep_features_over_reset flag. Setting this enables the drive to retain the settings for -APSWXZ over a soft reset (as done during the error recovery sequence). Not all drives support this feature.

-S

Put the drive into idle (low-power) mode, and also set the standby (spindown) timeout for the drive. This timeout value is used by the drive to determine how long to wait (with no disk activity) before turning off the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most drives are much quicker. The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values.

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.