LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-05-2011, 09:11 PM   #1
anctop
Member
 
Registered: Feb 2010
Posts: 99

Rep: Reputation: Disabled
sudden decrease in free space


My system has two disks, each one has two partitions and they are mirrored (RAID 1), i.e.

/dev/md1 = "sda1" and "sdb1" mirrored
/dev/md2 = "sda2" and "sdb2" mirrored

A cron job is scheduled to report disks usage daily using "df -a -T".

Today I notice a significant drop in free space of md1. The last check (on 2011.12.06 02:08:09) shows :

Code:
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/md1      ext2    44402252   4529824  37616912  11% /
proc          proc           0         0         0   -  /proc
sysfs        sysfs           0         0         0   -  /sys
devpts      devpts           0         0         0   -  /dev/pts
/dev/md2      ext3    88811952  17448148  66852360  21% /home
nfsd          nfsd           0         0         0   -  /proc/fs/nfsd
but now it reads :

Code:
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/md1      ext2    44402252   5391660  36755076  13% /
proc          proc           0         0         0   -  /proc
sysfs        sysfs           0         0         0   -  /sys
devpts      devpts           0         0         0   -  /dev/pts
/dev/md2      ext3    88811952  17443208  66857300  21% /home
nfsd          nfsd           0         0         0   -  /proc/fs/nfsd
It appears that about 850MB of space on "md1" has been eaten in the past few hours.

I've checked all the files created today, but I can't find any exceptionally huge file, nor a very large number of files.

Also, "dmesg" shows no error.

Could someone suggest further diagnosis ?

Last edited by anctop; 12-05-2011 at 11:40 PM.
 
Old 12-05-2011, 11:21 PM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Please use code tags, as it makes reading console output much easier by maintaining spacing etc.

Try checking your /var/log, for huge log files.
Sometimes, depending on how its configured, if something goes wrong, syslog can generate a whole bunch of log entries that can eat up disk space in no time.

Just a thought.
 
Old 12-06-2011, 12:28 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
From 13% to 11% doesn't necessarily sound that massive to me.

After checking for rotated log files (those ending in .gz) you can delete, look at deleted files which are still open:
lsof +L1

Some programs, especially services will create a file, delete it but keep it open for use. This prevents name collision. Also, if the service crashes, the service's working file will be deleted.

If you use the desktop, the cache files can build up to GB in size. Look in ~/.cache/ and ~/.thumbnails/.

Since /tmp is a directory on your root partition, that is a good place to check. Files here can be deleted between reboots. Your system may have a setting to do this, and another setting to delete old files.

Using a graphical file size program such as Konqueror's file size view, may help to quickly locate a large file causing the problem. Back when I used openSuSE 10.0, I had a problem with KDE causing the ~/.xsession-errors file to grow to over 1GB in size. A run away program could be creating a very large file. The FS view may be the best way to locate it.

Indexing programs such as updatedb, strigi or Picasa can build very large databases over time. One thing to check is if they index directories they shouldn't.

Last edited by jschiwal; 12-06-2011 at 12:32 AM.
 
Old 12-06-2011, 03:59 AM   #4
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
+1 for /var/log
Had systems with 8G+ logs ^^.
 
Old 12-06-2011, 06:06 PM   #5
anctop
Member
 
Registered: Feb 2010
Posts: 99

Original Poster
Rep: Reputation: Disabled
Thank you for the suggestions.

In fact I've examined all the files descending from "/" except for "/home" at which "/dev/md2" is mounted.
There're about 40 files created/modified during the period, but none of them is suspicious.

Then I try to kill and re-load the daemons one by one. I find that the cause of the problem should be a dead thread of "httpd". When the branch is killed, the disk usage returns to 11% !

But I'm confused : how is it possible to eat up disk space without forming visible files ?
 
Old 12-07-2011, 12:23 AM   #6
asimba
Member
 
Registered: Mar 2005
Location: 127.0.0.0
Distribution: Red Hat / Fedora
Posts: 355

Rep: Reputation: 42
I might have started with checking following

1. Temp Files
2. Log Files
3. Have you updated ANY software/
4. Temporary Internet files/partial downloads/cancelled downloads.
5. Any Installed database ? - this may be unlikely if - 1. its not a heavy workload environment 2.If you are not storing any any binary data in database

6. Does this system act as web server

Next We could generate list of files created/accessed/modified past 24 hours if that was going to drop any hint.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find and decrease File System space for Linux RAC servers austinbravo Linux - Newbie 4 12-29-2010 01:08 PM
Help removing free space to create Raw free space nightmare55 Linux - Newbie 11 10-01-2009 03:07 AM
increase free physical memory, decrease disk cache efm Linux - Hardware 4 03-30-2006 09:53 AM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:43 PM.

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