Do you have to sleep in the same room your computer is in? Do you have a
noisy harddisk that makes you want to scream? Did you praise the lord when
hdparm (or scsiidle) allowed you to spin these drives down during idle
times?

If you answer yes to the above questions, you'll probably also curse the
cron daemon, which reads its config file every five minutes or so. And
though reading shouldn't need the harddisk to spin up, it _does_ change the
atime stamp of the config file, and thus data needs to be _written_ back
eventually. D'oh!



Being in exactly that situation, I devised this small package to silence the
machine as much as possible. The central part is a kernel patch that adds a
"noatime" mount option to the ext2 filesystem (sorry, guys, only that one
supported). So now you can mount the filesystem cron lives on something like

/dev/hda3        /        ext2        defaults,noatime

This, however, won't help yet. The problem is that many things started by
cron redirect their output to /dev/null, which gets its mtime stamp changed
by it. As mtime stamps are pretty useful, disabling them is not really an
option.

So instead, I simply put all my devices onto a RAM disk. To do this, tell
lilo to set aside 100k for it (add "ramdisk = 100" to your /etc/lilo.conf)
and add the following lines to your rc.local

/sbin/mkfs.minix -i 700 /dev/ram 100
/sbin/mount -t minix /dev/ram /mnt2
cp -aR /dev/* /mnt2
umount /mnt2
mount -t minix /dev/ram /dev

Of course, you need a mount point /dev/mnt2


Now this _should_ keep the harddisk quiet for quite some longer. If it
doesn't, you might want to check the crontab entry for news --- some
installations write a timestamp to /tmp/news.running every so often.

There is something which puzzles me tremendously --- the command  line

while true; do date; sleep 30; done

keeps the disk spinning, though I have no idea why.... Any clues?



Anyway, this has saved me some sleep already, and I hope it does the same 
for you..... have fun!

Send any comments, bug reports, death threats, winning lottery tickets and
beautyful women to

    Bernd Meyer    
    eMail: bernie@wombat.hanse.de   OR   bernies@umibox.hanse.de
    snail: Schafshagenberg 2, D-21077 Hamburg, Germany
     
The wombat address is the preferred one.

   Bernie

