Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What's accessing my hard drive?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Carnildo
Guru
Guru


Joined: 17 Jun 2004
Posts: 595

PostPosted: Sat Jan 31, 2009 12:12 am    Post subject: What's accessing my hard drive? Reply with quote

I've got a computer that works as a router, switch, and firewall. It's set up so that after it boots, it should reach a state where it doesn't need to access the hard drive any more. However, every now and then the hard drive spins up briefly. How do I figure out what's causing this?
Back to top
View user's profile Send private message
Gef
Apprentice
Apprentice


Joined: 17 May 2008
Posts: 180
Location: France

PostPosted: Sat Jan 31, 2009 12:30 am    Post subject: Reply with quote

Syslog ?

You can use sys-process/iotop, or something like
Code:
echo 1 > /proc/sys/vm/block_dump
cat /proc/kmsg

to find that "process-that-keeps-blinking-your-hdd-led".
_________________
Laptop : Gentoo ~amd64
(remote) Server : Gentoo amd64
Back to top
View user's profile Send private message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 620
Location: Munich, Germany

PostPosted: Sat Jan 31, 2009 9:22 am    Post subject: Reply with quote

Quote:
It's set up so that after it boots, it should reach a state where it doesn't need to access the hard drive any more.


Do you base this on the assumption that everything will be cached in RAM eventually?

This usually doesn't work, because many applications have hard-coded file system reads/writes/syncs in order to purposefully flush caches to disk or bypass caches altogether. There are some valid reasons for doing so, although sometimes this is a symptom of sloppy coding.

If you really want to prevent disk access, you need to have no hdd device mounted at all (=run in RAM entirely, somehow).
Back to top
View user's profile Send private message
Carnildo
Guru
Guru


Joined: 17 Jun 2004
Posts: 595

PostPosted: Mon Feb 02, 2009 5:40 am    Post subject: Reply with quote

zyko wrote:
Quote:
It's set up so that after it boots, it should reach a state where it doesn't need to access the hard drive any more.


Do you base this on the assumption that everything will be cached in RAM eventually?

This usually doesn't work, because many applications have hard-coded file system reads/writes/syncs in order to purposefully flush caches to disk or bypass caches altogether. There are some valid reasons for doing so, although sometimes this is a symptom of sloppy coding.


What's there to write? It's a router, a switch, and a firewall. After finding what was writing to disk (ntpd updating its drift file) and dealing with it, the computer's gone 36 hours without spinning up the hard drive.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum