Operating System - Linux
1754295 Members
2838 Online
108813 Solutions
New Discussion юеВ

confusion about disk space - where's my 5GB?

 
SOLVED
Go to solution
yyghp
Super Advisor

confusion about disk space - where's my 5GB?

I noticed there were a same disk space issue on three of our oracle 10g servers, running Red Hat Enterprise Linux 3.
When I use "df -h", I could see:
# df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/vg00/lv06 9.7G 8.2G 1.1G 90% /u01

Which showed /u01 had used 8.2GB.

While I checked with "du -ks":
# du -ks /u01
3139912 /u01
# du -hs /u01
2.9G /u01

( /u01 is an Oracle directory )
# du -hs /u01/app/oracle
2.9G /u01/app/oracle


It showed only 3GB!
Why? Where's the other 5GB?
Thanks!
5 REPLIES 5
Alpha977
Valued Contributor

Re: confusion about disk space - where's my 5GB?

Hello!

have you checked with

"fdisk -l" ?
Is this disk "mounted"?
yyghp
Super Advisor

Re: confusion about disk space - where's my 5GB?

Yeah, /u01 is mounted, that's why I can see the content under.
Thanks!
Heironimus
Honored Contributor
Solution

Re: confusion about disk space - where's my 5GB?

Usually a discrepancy between df and du is caused by some files having been deleted while a process is still holding them open. Until the process either exits or explicitly closes the file the space won't be freed, but the links in the filesystem are gone so you can't see or measure it.

lsof might help find open-but-unlinked files.
Steven E. Protter
Exalted Contributor

Re: confusion about disk space - where's my 5GB?

Shalom,

Generally when this happens there is a process with a file handle on a file you deleted as sysadmin.

Kill the process and the space is recognized.

The different utils have been known to give inconsistent answers and normally a system boot clears this up.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
yyghp
Super Advisor

Re: confusion about disk space - where's my 5GB?

Thanks!
Yes, the space was released after restart the oracle services.
Points added!