Compiling from source:

cd
wget http://sourceforge.net/projects/hd-idle/files/latest/download
tar xvfz download

sudo apt-get install debhelper

cd ~/hd-idle
dpkg-buildpackage -rfakeroot

 Installing:

cd ..
sudo dpkg -i hd-idle_*.deb
sudo service hd-idle start/stop
sudo update-rc.d hd-idle defaults

List devices:

sudo fdisk -l

Configuration:

sudo apt-get install blkid
sudo blkid

sudo vi /etc/default/hd-idle
set START_HD_IDLE=true
set HD_IDLE OPTS in the end of the file something like this:
HD_IDLE_OPTS="-a /dev/sda -i 120 -l /var/log/hd-idle.log"

 

Check the device state:

sudo hdparm -C /dev/sda

 Troubleshooting:

If the hdd is not spinning down, try to disable the APM Mode

sudo hdparm -B255 /dev/sda

oder

/etc/rc.local ergänzen:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
(/bin/sleep 30 && hdparm -B 128 -S 120 /dev/sda)

exit 0
de_DEDeutsch