LinuxCommandLibrary

hd-idle

utility that spins down external hard disks after a period of idle time

TLDR

Start the hd-idle service with default settings (10 minute idle time)

$ systemctl start hd-idle
copy
Spin down a disk immediately
$ hd-idle -t [/dev/sdX]
copy
Set per-disk idle times in seconds
$ hd-idle -i 0 -a /dev/sda -i [300] -a /dev/sdb -i [1200]
copy
Disable spin-down globally, enable for specific disks only
$ hd-idle -i 0 -a [/dev/sda] -i [600]
copy

SYNOPSIS

hd-idle [options]

DESCRIPTION

hd-idle is a utility that spins down external hard disks after a period of idle time. It is particularly useful for USB or eSATA drives that don't support the hdparm -S command for automatic spin-down.
The daemon monitors disk activity and issues spin-down commands when disks have been idle for the configured time. Different idle times can be set for different disks, allowing fine-grained control over power management.

PARAMETERS

-a DEVICE

Apply the following idle time to the specified device
-i SECONDS
Set idle time in seconds (0 disables spin-down)
-t DEVICE
Spin down the specified disk immediately
-l LOGFILE
Log spin-down events to specified file
-d
Run in debug mode, do not daemonize

CAVEATS

Works best with external drives that don't support native APM. Some drives may not respond to software spin-down commands. Frequent spin-down/spin-up cycles can reduce drive lifespan.

HISTORY

hd-idle was created as a solution for external drives that lack proper power management support. It fills a gap where hdparm's spin-down feature doesn't work, common with USB enclosures that don't pass through ATA commands.

SEE ALSO

hdparm(8), sdparm(8), smartctl(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community