Operating System - HP-UX
1828122 Members
2465 Online
109974 Solutions
New Discussion

Files uses more disk space than file system size.

 
SOLVED
Go to solution
Jdamian
Respected Contributor

Files uses more disk space than file system size.

Hi

I found a VxFS file system (where Oracle DB creates its temporary data files) whose size is smaller than the total amount of all files. Moreover, du command shows smaller sizes for those files:

Filesystem kbytes used avail %used Mounted on
/dev/vg_oracle/TEMP 8253440 8081463 161234 98% /sgbd/temp

The contents of this file system is:
# ll pindb
total 16156676
-rw-r--r-- 1 oracle dba 9744 Abr 22 2003 alter_pctincrease.sql
-rw-r----- 1 root sys 1073741824 Jul 7 09:37 test
-rw-r----- 1 oracle dba 2147491840 Jul 7 03:21 temporal01.bdf
-rw-r----- 1 oracle dba 2147491840 Jul 7 03:34 temporal02.bdf
-rw-r----- 1 oracle dba 2147491840 Jul 7 03:25 temporal03.bdf
-rw-r----- 1 oracle dba 2147491840 Jul 7 03:59 temporal04.bd

You may compute total amount: 9437216 KB (aprox 9 GB)... but bdf command shows near 8 GB.

I unmounted and fsck'ed using -o full option... but no error is found.

'du' command shows file sizes other than 'ls -l' command.

# du -ks *
10 alter_pctincrease.sql
1048584 test
1791800 temporal01.bdf
1767224 temporal02.bdf
1742560 temporal03.bdf
1728160 temporal04.bdf

My account ingeneer says this issue is found where Oracle uses 'sparse files'... what are those ? where can I read tutorials/info about they ? Is it a feature from Oracle or from VxFS ?

Thanx in advance
2 REPLIES 2
Sanjay Kumar Suri
Honored Contributor
Solution

Re: Files uses more disk space than file system size.

Check this link:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=101146

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Fred Ruffet
Honored Contributor

Re: Files uses more disk space than file system size.

Both ll/bdf and du are right.

Oracle preallocates space for its temp file. For efficient use, these are not designed the same way as datafile (all filled with zeros at creation). Only used space is physically written. "du" shows you this size.
To be sure noone uses the space Oracle will possibly use, it preallocates this space (tempfile size). This is what ll/bdf show you.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)