Power management of HDD on the RPi
Most spinning disk drives (HDDs) have built-in power management features that will automatically spin down after a period of inactivity, but you can also configure this behavior on your Raspberry Pi for more control.
Default behavior: Many drives will automatically enter a low-power state after 10-20 minutes of inactivity, but this varies by manufacturer and model.
Manual control options:
- Using
hdparm(most common approach):
# Check current power state
sudo hdparm -C /dev/sda
# Set spindown time (example: 60 = 5 minutes of inactivity)
sudo hdparm -S 60 /dev/sda
# Make it permanent by adding to /etc/hdparm.conf
Using hd-idle (alternative tool):