Operating System - HP-UX
1836519 Members
2620 Online
110101 Solutions
New Discussion

Re: bdf reports wrong %used

 
SOLVED
Go to solution
Mauro Gatti
Valued Contributor

bdf reports wrong %used

Hi all, after I had a full filesystem, I deleted some files but now "bdf" still reports 100% used.
I'm sure if I reboot server It is reporting correctly but unluckly I can't do it so... How can I force bdf to indicate correct percentage?

Thank You


Ubi maior, minor cessat!
10 REPLIES 10
Robert-Jan Goossens
Honored Contributor

Re: bdf reports wrong %used

Hi,

I think you have removed open files, try using a tool like fuser or lsof to locate the processid's of the open file.

Regards,
Robert-Jan
Patrick Wallek
Honored Contributor

Re: bdf reports wrong %used

The problem most likely is that you deleted some files that were still in use by a process. Until whatever that process is dies or releases the files, your filesystem will still show 100%.

Sridhar Bhaskarla
Honored Contributor

Re: bdf reports wrong %used

Hi,

You might have deleted the files that are still being accessed by the processes. Until you restart the processes, you will not get the space back.

You will need to use 'lsof' to find such processes. Search the forums for a site to download lsof. It's a must to have on the system.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Pete Randall
Outstanding Contributor
Fabio Ettore
Honored Contributor

Re: bdf reports wrong %used

Ciao Mauro,

insert 'bdf du -sk' as keywords in ITRC search; you will get many many helps about this argument (of course, in add of other people in this posting).

Best regards,
Ettore
WISH? IMPROVEMENT!
Steven E. Protter
Exalted Contributor

Re: bdf reports wrong %used

If you boot your box, the processes that have filehandles open will close causing the space to be released.

fuser -cuk /fsname

will kill all open processes on a filesystem. Use with great care.

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
Dave Hutton
Honored Contributor

Re: bdf reports wrong %used

It happens when you delete a file and the process is still using the inode. If you can stop and start the process you will gain your space back.

You can find the process by
#fuser -u /whichever/file/wasdeleted

You can also do it to the mount point but obviously other files could have processes running.

To kill it you can either ps -ef | grep for the pid you had from the fuser or
#fuser -k /whichever/file/wasdeleted

Dave
Jeroen Peereboom
Honored Contributor

Re: bdf reports wrong %used

In addition to Dave's answer and the others:

Do not remove (log)files without checking for processes that have the file open. You may use fuser BEFORE you remove the file.
If there is no process, you can safely remove the file.
If there is a process, you either stop the process before removing the file, or you empty the file using the command '>filename'.

Indeed one may install lsof, but if you take care you probably don't need it. It can be handy though.

JP.
Mauro Gatti
Valued Contributor

Re: bdf reports wrong %used

Thank You for your answers...
A last question about this problem:
The real operation done on these file was a "resize" made by DBA.
So I discovered these file are tablespace and process owner is oracle smon e dbw.
My question is: Why doing a "resize" from oracle when filesystem is 100% full does it create this problem and when filesystem isn't full doesn't it happen?

Thank You
Ubi maior, minor cessat!
Fabio Ettore
Honored Contributor

Re: bdf reports wrong %used

Ciao Mauro,

about your question:
"Why doing a "resize" from oracle when filesystem is 100% full does it create this problem and when filesystem isn't full doesn't it happen?"

If problem doesn't happen when filesystem isn't full then it means that files were removed they were not being used.
These is the focus of the problem, filesystem full or not full is not important to individuate the reason of the bdf problem.
When files are removed (or resized) during a process or more processes are using them, bdf doesn't recognize the freed space. Then it is needed lsof to search out what processes are using what files yet for the system.

I hope this clarifies and answers to your last question.

Best regards,
Ettore
WISH? IMPROVEMENT!