LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-15-2011, 07:41 AM   #1
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Rep: Reputation: 5
df reporting 100% but du reporting 20%


Hi Friends,

Today morning I logged on to one of our servers (through ssh -X) to perform a routine maintenance. When I tried to open a GUI application, it failed to connect to the X server of the workstation. Eventually I ended up issuing the command

Code:
df -h /
and shockingly it showed that / is 100% used. I checked / using

Code:
du --max-depth=1 -xh /
to check the sizes of the individual directories, which showed that only about 18% of the / is used and that confused me badly. There was no quick solutions when I googled around; but luckily I found the following link which nicely explained the issue I had:

http://www.walkernews.net/2007/07/13/df-and-du-command-show-different-used-disk-space/


All I did was found out the services responsible for those unreleased files (using lsof +L1) and restarted them. That is it. Now df reports only 18% of the disk is used and all my X things started working again, thanks to Walker.

I felt sharing it here for somebody who is having similar problem.

Cheers
 
Old 04-15-2011, 12:34 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Yes - as noted in the post you referenced this happens not only in Linux but also in UNIX.

The issue is that files have both "names" and "inodes". If a file is being held "open" by a process and someone deletes it they are deleting only the name. The inode is left unmolested until the process is stopped. Long ago the only way to be sure to clear the condition was by rebooting the server. A reboot worked because it killed ALL processes including whichever one was holding the file "open". LSOF is a great tool because it can help you find files held open that no longer have a name so you can resolve the issue by killing the process. (LSOF has quite a few other uses as well and is available for most flavors of UNIX as well as Linux.)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Memory Usage always reporting 100% - Fedora Core 3 rossx Linux - Server 6 08-15-2008 07:25 AM
Nagios2 in Debian: 100% Indeterminate/Undetermined Trend/Availability Reporting Akhran Debian 1 04-09-2007 12:20 PM
Nagios: 100% Indeterminate/Undetermined Trend/Availability Reporting Akhran Linux - Software 0 04-06-2007 09:28 PM
reporting hackers, am i going about this the right way? glorsplitz Linux - Security 10 11-12-2006 10:52 PM
df reporting incorrectly bigtl Linux - General 2 06-23-2005 06:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:32 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