Operating System - HP-UX
1833792 Members
2388 Online
110063 Solutions
New Discussion

bdf didn't show accurate disk space

 
SOLVED
Go to solution
kholikt
Super Advisor

bdf didn't show accurate disk space

I have one file consumed around 100MB space at /etc directory. I have compressed the file to only 30MB.

However, the / directory usage still no change. This is something very strange as I have the file doesn't link to any other place. My / directory is around 140MB only, /etc is not reside on a separate filesystem.

I have tried both bdf and df -k commands but the usage has no changed at all.
abc
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: bdf didn't show accurate disk space

Was / is the file in use by another process? If so, then it won't show accurate usage until that process releases the file. Remember that when you compress an existing file, a copy of the file is made during compression and the original is removed after the compressed file is created. If the original is still in use, it can't be completely removed.

lsof is a good utility to see what files are open for use by what processes.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.55/
Printaporn_1
Esteemed Contributor

Re: bdf didn't show accurate disk space

Hi,

If you have opportunity plase reboot the machine. Process will release the file and you will see the exact size
enjoy any little thing in my life
Steven Sim Kok Leong
Honored Contributor

Re: bdf didn't show accurate disk space

Hi,

As Patrick has highlighted, use lsof to locate the process holding onto the opened file(s).

A reboot is usually unnecessary and should be performed only as a last resort.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Karthik_2
Regular Advisor

Re: bdf didn't show accurate disk space

Kholikt,
This may probably due to an open file which is still occupying the space.I think it is even difficult to find what file it is with inbuilt unix utilities.
lsof is a good option to use.
Typically it may not require a reboot if u can stop/start the application that should mostly get rid of this problem.

(p.s--Kholikt I noticed that u have not assaigned ANY points to 42 answers which you have received for various posts.If the answers really helped you to solve your problem take some time to assign few points to the guys who answer your queries .They do put in their valuble time in this .
If those answers are not up to your expectations pls post your reply so that we can come up with few more options.
The idea here is more about did we help you to solve or guide you to solve your problem rather than points )

Cheers
Karthik...
Its ALL in the MATRIX