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

1. Using hdparm

sudo hdparm -C /dev/sda
sudo hdparm -S 60 /dev/sda

2. Using hd-idle

sudo apt install hd-idle
sudo hd-idle -a sda -i 300

3. System-level power management

Configure in /etc/hdparm.conf to make settings persistent across reboots.

Resume behavior

The drive will automatically spin up when accessed. There will be a brief delay of 2-5 seconds after the drive has spun down.

Considerations

  • Frequent spin-up/spin-down cycles can reduce drive lifespan
  • For media serving, use a longer timeout of 15-30 minutes
  • Some USB enclosures may not support all power management features