Howto: Automatically spin down external usb hard drives in Ubuntu

Spinning down external usb hard drives in Ubuntu doesn’t allways happen automatically in Ubuntu. To force a spindown, you can issue the command
sync sdparm --flexible --command=stop /dev/sdX &>/dev/null
where you should replace the sdX entry by the correct name of your external hard drive (usually sdb, sdc or similar).
To do this automatically every 5 minutes, save the code below as e.g. ~/bin/spindown/spindown.sh.
Read more…

