If you're not using your Kurobox 24 hours a day, it could be good to allow the hard drive to spin down and reduce noise and power usage. For this you'll need to install hdparm to tune the sleep delay, and configure syslog to prevent it from writing to the disk, causing it to wake up every 20 minutes!

You can give options to the hdparm command to either view or change specific characteristics. Look through the man page or /etc/hdparm.conf to find out what each option does. For example, changing the spindown time to 5 minutes from the command-line would be:

hdparm -S60 /dev/hda

Read through this Gentoo wiki page to find out some good options to play with in order to possibly increase your drive performance. Make sure to run this drive test both before and after in order find out whether you changes made things better or worse:

hdparm -tT /dev/hda

Configuration

Once you have found the best possible settings for your drive, edit the hdparm configuration file:

vi /etc/hdparm.conf

You can either uncomment the lines about /dev/hda at the end of the file, which would make the section look like this:

Add any additional options within the curly brackets for those changes to be permanent. You can also edit the options individually throughout the file (information on each option is provided as comments within the file).

One last step is to make sure hdparm runs for at least your chosen runlevel. For some reason hdparm is not set to run on runlevel 2 by default, so use this command to first remove it's rc.d entries:

update-rc.d -f hdparm remove

Then use this command to add it back to runlevel 2 (with shutdown running at reboot, shutdown, and single-user mode):

update-rc.d hdparm start 19 2 . stop 19 0 1 6 .

In the above example I've set hdparm's priority to 19 so it is before such things as NFS, Webmin, etc. You can change this to some other reasonable setting (check your /etc/rc2.d folder to find a good number).

syslogd Configuration

If you do not do that, your HDD will be turned on every 20 minutes because syslog will log a "MARK" in /var/log/messages every 20 minutes. So we need to remove that marking :
edit /etc/init.d/sysklogd and set SYSLOGD to

SYSLOGD="-m 0"

If you've upgraded to a more recent version of syslogd, you'll find this parameter in /etc/default/sysklogd instead of the main script.
Note: User:mflint needed to edit '/etc/default/syslogd' instead of '/etc/init.d/sysklogd' in order to stop the MARK log entries.

exim Configuration

Exim is what the kurobox could be using as a replacement for sendmail. The problem is that it has no exim.conf file by default (which makes it write to one log file) and it wants to write to the drive every 15 minutes or so. Run this command to configure exim (which creates its configuration file):

eximconfig

I chose option(4) for local delivery only, and gave my non-root username for the recipient when asked during the questions. This process will create a file called /etc/exim/exim.conf with all the chosen configuration settings inside.

The next step is to make it so that exim doesn't try and write to logs every 15 minutes... otherwise setting up hdparm won't do us much good (depending on your setup). Edit the /etc/cron.d/exim, and change this line:

sync Configuration

There's one thing that might prevent a spindown, `sync` and atime. Sync runs to flush the file buffer, sync is itself a file so it's atime (last access time) gets updated, which then needs to be written out to disk, repeat. This will either stop your drive from ever spinning down, or will cause it to keep spinning back up when it's otherwise idle.

This is where the mount option noatime comes in. If someone is having trouble getting their drive to spin down, try mounting your filesystem(s) with the noatime (possibly nodiratime as well) to solve this catch.

crontab Configuration

If you have some, it means that cron wakes hourly, writing to syslogd and waking up your drive.
To prevent that, provided that you don't need it (check into/etc/cron.hourly for scripts to be launched hourly) , edit /etc/crontab and put a # in from of the hourly entry :

#17 * * * * root run-parts --report /etc/cron.hourly

troubleshouting

Launch the KURO BOX and leave it unused for a long time (e.g. several hours). Then issue the following command (replace YYYY-MM-DD by the current date) to check which log (or other files) have been written during this time (last modified files first) :

ls -ltR /var | egrep 'var|YYYY-MM-DD'

Then look into the least recently modified files to see the last entries and try to locate what is responsible for them.