Maybe your computer works in laptop mode. To change the behaviour of laptop mode in Ubuntu you should change parameters in file /etc/laptop-mode/laptop-mode.conf . These parameters among others could affect you:
# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds
# for battery and for AC with laptop mode on.
# Power management for HD (hdparm -B values)
Also in Debian distributions there could be some parameters in the file /etc/default/laptop-mode (but my Ubuntu 12.04 does not have this file).
There are some parameters that controls idle timeout that (here a citation):
The idle timeout that should be set on your hard drive when laptop mode
is active (BATT_HD) and when it is not active (AC_HD). The defaults are
20 seconds (value 4) for BATT_HD and 2 hours (value 244) for AC_HD. The
possible values are those listed in the manual page for "hdparm" for the
There is additionally a kernel laptop mode. Computer that works in kernel laptop mode will be spinning disk up slower but it should not change the spinning down behaviour.
To check kernel laptop mode try:
If the value is 1 or more it means the computer works in laptop mode. To disable laptop mode set it to 0.
A cite from https://www.kernel.org/doc/Documentation/laptops/laptop-mode.txt :
result of this is that after a disk has spun down, it will not be spun up
anymore to write dirty blocks, because those blocks had already been written
immediately after the most recent read operation."
Additional information about the kernel laptop mode could be found at site given above.