>: : >Hi Folks,
>: : >
>: : >I got a tool from a friend, thats makes my hard disc spin down after a
>: : >given time (it's for D*S). So I watched out for a similar one for Linux,
>: : >cause i didn't know before, how silent my comp can be if it wants to. :-)
>: "hdparm" will do this for IDE drives that support a spindown timeout.
>: (Look for the "-S" switch).
>Works great except for my root disk. I _think_ syslogd likes to write to a
>file every so often, so negating the effects of the spindown! Anyone know
>how to cure this?
On many computers, the BIOS can tell the hard disk to do this, as part
of the power-on initialisation. I do such a trick on my laptop and it
works a treat. The trick is to suspend the "update/bdflush"
processes. In this way, old data sits in the RAM cache, and never gets
flushed to disk. Hence, the disk never gets accessed (except of course
when you read something from it that has never been read before.. :-)
This more than doubles the life of my laptop battery.
**** BIG FAT WARNING TIME ****
Because new data is not written to the disk, if you lose battery power,
any work you do won't have been written to the disk. It's not possible
to trash your filesystem (since nothing ever gets half-written), but
you will lose any work you've done.
To do this, log on as root, and use "ps -aux" to find the "bdflush" and
"update" processes and their process id's. Then, send them signal 18
(SIGSTOP) using kill -SIGSTOP x y, where x and y are the process IDs.
When you want to save all your work to disk on a one-off basis, run the
"sync" command (as any user). This will write the buffer cache to the
When you want to resume the write-every-30-secs-and-never-power-down-but
it's-safer-this-way mode, send signal 19 (SIGCONT) to the processes, ie
kill -SIGCONT x y.
I dunno. This is just such an astoundingly useful trick for laptop
owners that I'm surprised it hasn't appeared in the Linux TIPS Howto.
Hmm. Might just send this off then.....
Hope this has helped you.