Operating System - HP-UX
1827428 Members
3814 Online
109965 Solutions
New Discussion

BDF not showing correct sizes

 
Mike Barron_3
Advisor

BDF not showing correct sizes

/dev/vg_agvte/lvol3
286720000 152782296 132891392
53% /u07/oracle/oradata/agvte

This file system above is 286 Gb, I am in the process of doing a db restore through Data Pro. The bdf says its using 152 Gb. Thing is, I know its only done like 12Gb... du -sk shows up wrong amount along with this bdf. Any ideas? There are no hidden files and no procs running with the old files in the file system.
7 REPLIES 7
baiju_3
Esteemed Contributor

Re: BDF not showing correct sizes

Hi Mike,


Use fuser -cu /u07/oracle/oradata/agvte to see the process associated with . If you are sure you have enough free space that is not refelcted in bdf o/p .

Unmount the file system and Mount it back .
Can use fuser -ku /u07/oracle/oradata/agvte

to kill the process associated while unmounting .


thx,
bl.
Good things Just Got better (Plz,not stolen from advertisement -:) )
James R. Ferguson
Acclaimed Contributor

Re: BDF not showing correct sizes

Hi Mike:

Databases often contain "sparse" files. Depending on the restoration method, sparse files can be inflated (null padded) such that they are no longer sparse. This could be the cause of your observation.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: BDF not showing correct sizes

Almost certainly this is the result of file(s) being unlinked (rm'ed) but the process(es) which had them open are still running. When a file is unlinked the link count is reduced by 1, if the link count is now 0 then the directory entry is removed BUT the actual filesystem space is not freed until the file is closed or all processes which had the file open are terminated. Man 2 unlink for details.
If it ain't broke, I can fix that.
Chauhan Amit
Respected Contributor

Re: BDF not showing correct sizes

Hi Mike,

The bdf collects the filesystem size by checking the inodes information. when you delete a file/log and the file is locked by a process like syslogd/application which continously updates the file, the kernal does not release the inodes immediately and hence bdf will not show the released space. The only way out is to find the process locking the files and kill them use the uli script I have given and find the process locking the file and kill the process.

#chmod 777 uli.sh
#sh ./uli.sh
#./uli

Regards,
Amit
If you are not a part of solution , then you are a part of problem
Chauhan Amit
Respected Contributor

Re: BDF not showing correct sizes

Also note that du uses 512 byte blocks and bdf is 1024 byte blocks hence there will be a difference between the "bdf" and "du" outputs.

Regards,
Amit
If you are not a part of solution , then you are a part of problem
Jon M Zellhoefer
Valued Contributor

Re: BDF not showing correct sizes

Don't forget about "inode reserve" files ... lsof /mountpoint should show you if something has reserved inodes but has not written the file to your filesystem.