by hydro » Thu Dec 22, 2011 10:36 am
I'm not too familiar with SATA drives, but I think hdparm can handle them as well. You can set the standby timeout (10 minutes in this example, see man page)
$this->bbcode_second_pass_code('', '
hdparm -S 120 /dev/sda
')
or force standby immediately
$this->bbcode_second_pass_code('', '
hdparm -y /dev/sda
')
However, if your operating system is on your hard drive, you may have to set some other options to avoid spinning up again too soon, if a process wants to write to disk. If hdparm doesn't work, try sdparm or sg_start (package: sg3_utils). The latter is also required by spindown (in AUR).