1833838 Members
1997 Online
110063 Solutions
New Discussion

bdf + f/s issue

 
SOLVED
Go to solution
Scott_20
Occasional Advisor

bdf + f/s issue

all,
i have a 500MG vg00/root, the usage was up to
92%, so I removed a 100MG file, but the % used hasn't changed. One of our engineers said it had to do with space for overhead management. can some expound, or recommend how I can fix the problem?
thanks
I'm ok
5 REPLIES 5
Geno Church_1
Valued Contributor

Re: bdf + f/s issue

Could be that the file you deleted was held open by someone else or another application was writing to it. If you reboot the machine the space will be reallocated.

Geno
A. Clay Stephenson
Acclaimed Contributor

Re: bdf + f/s issue

If I can do the math a 500MB filesystem housing a 100MB file should free about 20% but ALL of that free space was for overhead management. I suggest that you lift that engineer overhead and drop him.

Removing a file (unlinking in UNIX speak) only reduces the link count. If the link count is zero, the directory entry is removed. The file is not actually removed until all processes which had the file open either close the file or terminate. You need to use fuser or better lsof to find the process that is still using the file and terminate it.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: bdf + f/s issue

Hi Scott,

If you removed 100MB file, the usage would definitely change as the overhead is inclusive of 92%.

The file you removed is being used by a process. Unless the process releases it, you won't see the difference utilization.

What you can do is to run "lsof" and find out the open files. If you scroll through the output, you will find a line where the 7th column is ~100MB with 8 column indicating hte logical volume for vg00/root. The first and second columns give you the process and the pid respectively. Make sure it is not going to impact the system if you shutdown the process.

You can get lsof from

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/

Once it is installed, you can run it as

/opt/lsof/bin/lsof /dev/vg00/lvol3 > /tmp/lsof.out.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Robert-Jan Goossens
Honored Contributor

Re: bdf + f/s issue

Hi Scott,

You probably removed an open file. You will have to find the process that keeps the file open. lsof is a great tool for these kinds of actions.

Hope this helps,
Robert-Jan
doug mielke
Respected Contributor

Re: bdf + f/s issue

du -ks /dirname should give an an accurate number.