LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   wheres my disk space going? (https://www.linuxquestions.org/questions/linux-general-1/wheres-my-disk-space-going-746941/)

clint_silver 08-12-2009 04:39 AM

wheres my disk space going?
 
Ive an oracle install on rh 4 (I think its 4, not in front of it, on another site).

/u01 has the oracle binaries, 20gb volume. If as root I cd to /u01 and a du -sk, I can see total directories total 14gb. If I do a df -k, /u01 has 19gb used. Wheres the other 5gb?
Wherever its gone its increasing usage a few mb every few minutes. Ive cleared down many gb, Ive no tracing, loggin or auditing. Can there be something memory related eating that disk that wouldnt show up in a du search?

From /u01 as root I also did
ls -lR >> file1 ,
waited 30 minutes,
ls -lR >> file2

diff file1 file2 >> diffs
showed nothing, few small log files oracle related but nothing to show whats eating the space.

Anyone?

junust 08-12-2009 05:53 AM

Hi, do you realise, that, when do you do du -k from directory position you will see directory containing data size, but when you just do df -h or -k /something, you'll see just the volume(partition)size of course it will be more data, then just du -h or -k from directory state

clint_silver 08-12-2009 08:51 AM

Quote:

Originally Posted by junust (Post 3640305)
Hi, do you realise, that, when do you do du -k from directory position you will see directory containing data size, but when you just do df -h or -k /something, you'll see just the volume(partition)size of course it will be more data, then just du -h or -k from directory state

not sure I totally follow

logon as root
cd /u01
du -sk *

dir1 = 5gb
dir2 = 5gb
dir3 = 4gb

= total 14gb

now do

df -k
u01 vol =20gb used = 19.5bg free= .5gb

what are you saying there?

chrism01 08-13-2009 01:38 AM

See post #4: http://www.linuxforums.org/forum/mis...reporting.html
Quote:

It's quite simple really: du and df are two quite different programs, and as such they do different things.

du collects recursive disk usage on a certain directory, and therefore gives the result you expect.

df, however, only gives information an entire filesystems. It doesn't care the slightest about certain subdirectories inside a filesystem. In more technical terms, df is just a front-end to the statfs syscall.

Quote:
Originally Posted by The manpage for df
With no arguments, df reports the space used and available on all cur-
rently mounted filesystems (of all types). Otherwise, df reports on
the filesystem containing each argument file.
As you can see from that, if you call df with a directory as the argument, it will report information about the filesystem that the given directory resides on, not about the directory itself.

Wim Sturkenboom 08-13-2009 02:44 AM

You might have files that are deleted but still 'in use' by an application. See http://www.linuxquestions.org/questi...rom-du-632127/

clint_silver 08-13-2009 03:29 AM

Quote:

Originally Posted by Wim Sturkenboom (Post 3641516)
You might have files that are deleted but still 'in use' by an application. See http://www.linuxquestions.org/questi...rom-du-632127/

I agree with both, ie, something could have been deleted but for the life I cant think what, there are no logs or traces going to /u01, all datafiles for the oracle database are located elsewhere, this is something that started 3-4 days ago, and last night suddenly cleared itself out. Noone else on the box except me.

If it was something temporary memory related where a process on the box used a chnk of disk space for memory, but Ive never heard of this in 15 years in oracle where oracle used disk space on /u01 to do this. This box has been in use for last 2 years and this is first instance of it. All very strange. Thanks for suggestions.


All times are GMT -5. The time now is 09:02 PM.