Finding out what is spinning up harddrive

inotify-tools is a simple way of doing this. There are several examples on their site that would be able to do what you want (see the inotifywatch example for a really basic one).


Try running iotop perhaps? I've found it useful in the past.


Another tip: Use Systemtap, there are bunch of probe scripts on systemtap's site useful enough to find the culprit.

In another case altogether,

If you want to find out which process caused the disk to spin up, you can gather information by setting the flag /proc/sys/vm/block_dump. When this flag is set, Linux reports all disk read and write operations that take place, and all block dirtyings done to files. This makes it possible to debug why a disk needs to spin up, and to increase battery life even more. The output of block_dump is written to the kernel output, and it can be retrieved using "dmesg" or look at your syslog kern facility for the destination of the debug messages. Generally, it should be /var/log/debug . When you use block_dump and your kernel logging level also includes kernel debugging messages, you probably want to turn off klogd, otherwise the output of block_dump will be logged, causing disk activity that is not normally there.