LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-20-2008, 02:00 AM   #1
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Rep: Reputation: 15
Find out what hard disk is reading/writing to


Hi,
I'm trying to build an ultra-quiet linux server, as I'll be sleeping in the same room.
Nearly there - apart from an annoying clicking from the hard disk as the heads seek at regular intervals. It seem to do a very brief seek every second or so, which is driving my potty.

Is there any way of working out exactly what it is writing to? Any monitoring software that will show the actual files written and process involved. That way I can turn off any unwanted daemons etc.

I understand it has a chance to be swap or logs or something I cant do anything about but it would be nice to see what it is.

Thanks
 
Old 05-20-2008, 02:56 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,243

Rep: Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382
Sounds more this. (not just a Ubuntu problem BTW)

If you have a recent kernel with taskstats turned on, try iotop.py
Won't tell you the file, but might indicate which process(es) is/are doing I/O.
 
Old 05-20-2008, 03:19 AM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Look in your logs. I once had a machine that wasn't getting the answer it expected from DHCP and was writing 'DHCP...not found' to a log. Every minute, or so.

This is not only a worry for the hard disk life, but it is also an irritation.

(Could also be swapping, if you are low on memory.)
 
Old 05-21-2008, 03:21 AM   #4
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Rep: Reputation: 15
Thanks All.
Still cant work this out. I dont think it is the hard disk spindown as its literally every second. Tried updating the setting with hdparm but I get an error for some reason.

Its not swap as I've loads of memory.

Nothing is written to any of the log files in /var/log

I'd like to try the iotop.py command. I downloaded it but it wont run as I dont have the iostats gathering enabled on my kernel - opensuse 10.3. Is it possible to load/install this as a module or would I have to build a custom kernel?

I'm going to boot into a different O/S partition on the same drive and see if it does the same thing. That way I should know if it is o/s/software or hardware related.
 
Old 05-21-2008, 03:40 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,243

Rep: Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382
Nope - taskstats is an option, not a module.
One thing I have seen suggested (for Ubuntu) is to run a liveCD that supports persistence. That means local config files get written to a USB key (say).
Run and see what gets updated - lot less files to check.

Also you might need to go all the way and try blktrace. Veeerrry sexy.
 
Old 05-21-2008, 04:13 AM   #6
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Rep: Reputation: 15
Thanks - a few options for me to follow up.
To be honest I was thinking about giving fedora 9 a go, so will see if that has the same problem.
 
Old 05-21-2008, 05:00 AM   #7
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Rep: Reputation: 15
I'm starting to think this may just be the journalling on my ext3 filesystems. The frequency is so consistent ~1 second.

Does anyone know if it reads/writes journals even if no actual disk writes have taken place?

Could some kind person check the hdd led on their box at idle and see if they see the same brief flicker every second or so?

Thanks
 
Old 05-21-2008, 05:18 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,243

Rep: Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382Reputation: 3382
Maybe - I've run with "noatime,nodiratime" for ages. Should have mentioned it earlier ...
Easy to set on and test.
 
Old 05-21-2008, 05:55 AM   #9
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Rep: Reputation: 15
Never knew about that option, but sounds like it could cause the symptoms I'm describing.

I'll have a check/play when I get home.
 
Old 05-22-2008, 02:49 AM   #10
newbuyer17
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Rep: Reputation: 15
I had high hopes of that working, but sadly it never made any difference.
I have also seen another thread that has pointed me at changing commmit interval on ext3 filesystems, so I'll give that a go too.

I guess I should also see if it does the same thing in single user mode, as well as trying another distro, which I haven't had chance to do yet.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
the system is hung reading the hard disk dissident_goodchild Ubuntu 4 04-30-2007 05:41 AM
Need help Reading/Writing to Ext Hard Drive dlw314159 Linux - Newbie 2 04-25-2006 12:11 AM
Slackware Install not actually writing to hard disk MichaelF Slackware - Installation 5 11-03-2005 04:58 AM
Reading raw hard disk sectors villie Programming 4 05-13-2004 01:18 AM
writing to hard disk from kernel mode.. udayan Programming 0 07-09-2002 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration