Does any one have any ideas how to track down what's waking my hard disk up every few seconds? The problem is that the Linux PC sometimes spends hours not being used and I'd like the HDD to spin down after (say) 15 minutes of inactivity. I've set the BIOS power-saving HDD spin-down and this works well enough when booted to DOS, but in Linux it just won't sleep. If I force it to sleep using 'hdparm -y /dev/hda1', it spins down and promptly starts up again after a few seconds.
I've ensured that it's not cron waking it up and I've also disabled the syslog from writing ' -- mark --' into the log file every so often, but now I'm stumped. I've looked in the log files in /var/log but nothing's owning up so far. Is there a way of logging every disk access request or something like that?
Any ideas, anyone? Thanks!
Gerald.
On Wed, Mar 26, 2003 at 06:19:26PM +0000, Edenyard wrote:
Does any one have any ideas how to track down what's waking my hard disk up every few seconds? The problem is that the Linux PC sometimes spends hours not being used and I'd like the HDD to spin down after (say) 15 minutes of inactivity. I've set the BIOS power-saving HDD spin-down and this works well enough when booted to DOS, but in Linux it just won't sleep. If I force it to sleep using 'hdparm -y /dev/hda1', it spins down and promptly starts up again after a few seconds.
Are you using ext3 or reiserfs or XFS? some of the journalling filesystems write a checkpoint (not sure of the exact terminology) to disk every few seconds. If you are using ext3 you can play around with the journalling type options when the disk is mounted, or you could try mounting it with ext2 and seeing if it stops the mysterious accesses...
Just a thought anyhow.
Adam
sync runs every 30 secs to flush the disk buffers.
On 26-Mar-2003 Edenyard wrote:
Does any one have any ideas how to track down what's waking my hard disk up every few seconds? The problem is that the Linux PC sometimes spends hours not being used and I'd like the HDD to spin down after (say) 15 minutes of inactivity. I've set the BIOS power-saving HDD spin-down and this works well enough when booted to DOS, but in Linux it just won't sleep. If I force it to sleep using 'hdparm -y /dev/hda1', it spins down and promptly starts up again after a few seconds.
I've ensured that it's not cron waking it up and I've also disabled the syslog from writing ' -- mark --' into the log file every so often, but now I'm stumped. I've looked in the log files in /var/log but nothing's owning up so far. Is there a way of logging every disk access request or something like that?
Any ideas, anyone? Thanks!
Gerald.
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
raph@panache.demon.co.uk raph@panache.demon.co.uk wrote:
sync runs every 30 secs to flush the disk buffers.
Surely if there's nothing to write to disk, it doesn't access the disk?
On Thu, Mar 27, 2003 at 10:03:29AM +0000, MJ Ray wrote:
raph@panache.demon.co.uk raph@panache.demon.co.uk wrote:
sync runs every 30 secs to flush the disk buffers.
Surely if there's nothing to write to disk, it doesn't access the disk?
file access times. If you don't want these set then use noatime option in your fstab.
I agree. It may updating the superblock or summat like that.
On 27-Mar-2003 MJ Ray wrote:
raph@panache.demon.co.uk raph@panache.demon.co.uk wrote:
sync runs every 30 secs to flush the disk buffers.
Surely if there's nothing to write to disk, it doesn't access the disk?
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
On Wed, 26 Mar 2003 18:19:26 +0000 "Edenyard" mail@edenyard.co.uk wrote:
Does any one have any ideas how to track down what's waking my hard disk up every few seconds? The problem is that the Linux PC sometimes spends hours not being used and I'd like the HDD to spin down after (say) 15 minutes of inactivity. I've set the BIOS power-saving HDD spin-down and this works well enough when booted to DOS, but in Linux it just won't sleep. If I force it to sleep using 'hdparm -y /dev/hda1', it spins down and promptly starts up again after a few seconds.
I did see an interesting progam in Debian called noflushd which is supposed to spin down disks and prevent them being written to until something needs to read. I haven't tried it out yet.
Steve.