1832609 Members
2456 Online
110043 Solutions
New Discussion

rm files and bdf

 
SOLVED
Go to solution
Joe Profaizer
Super Advisor

rm files and bdf

my file system was full at 100%, so I had a couple files deleted that were abour 300mb each. bdf still shows no space available on the file system. I waited about 5 minutes and tried bdf again, to no avail.

Any commands I can run to correct the situation. du -k shows the correct amount of space used.


..Joe
11 REPLIES 11
Helen French
Honored Contributor

Re: rm files and bdf

Joe,

Check this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x276050011d20d6118ff40090279cd0f9,00.html

HTH,
Shiju

Life is a promise, fulfill it!
Mark Greene_1
Honored Contributor
Solution

Re: rm files and bdf

as root, run fuser against the file names you removed. Chances are there is a process that still holds a lock on the file and so the space is not freed until the lock is lifted. Fuser will give you the process ID's locking the file, which you can then plug into ps and see who's doing what with the files.

HTH
mark
the future will be a lot like now, only later
Steven Sim Kok Leong
Honored Contributor

Re: rm files and bdf

Hi,

You have open file(s). Use fusers or lsof (which does a better job) to identify the process that is hanging on to the open file(s).

Once you terminate the rogue process, your bdf and du -sk output should match closely.

Hope this helps. Regards.

Steven Sim Kok Leong
A. Clay Stephenson
Acclaimed Contributor

Re: rm files and bdf

I suspect that the processes that had these files open are still running. The files are actually removed only when all processes which had them open are terminated or those processes close the files. The directory entries are gone but the files themselves remain until the files are closed.

You can do an fuser or (better an lsof) and determine which processes still have those files open.
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: rm files and bdf

Hi Joe,

Take a look at this:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xdec879bffde7d4118fef0090279cd0f9,00.html

HTH,
Shiju

Life is a promise, fulfill it!
James George_1
Trusted Contributor

Re: rm files and bdf

Hi

as all have mentioned, some process is holding the space. kill that user with fuser command, or shutting down the application and starting it again also will clear up the space.

James
forum is for techies .....heaven is for those who are born again !!
Sudalaimani
Frequent Advisor

Re: rm files and bdf

Use the command
#sync
#sync
This may be helpful to flush the buffer and sync the disc and will give U the exact match with bdf and df.... just give try .. it worked for me some times
A Long Journey Starts with Single Foot Step
harry d brown jr
Honored Contributor

Re: rm files and bdf

Joe,

As mentioned, get lsof (beats the hell out of fuser, plus it has network features!) from:

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


and before blowing away files, make sure no one has them open, otherwise you are defeating the purpose.

live free or die
harry
Live Free or Die
SHABU KHAN
Trusted Contributor

Re: rm files and bdf

Joe,

Did you try bdf -i ? You might have run out of inodes...

Do this from the file system that is 100%

ls -lR | grep "^-" | sort -nr -k 5 | more

This will list all files by size in descending order...

-Shabu
T. M. Louah
Esteemed Contributor

Re: rm files and bdf

A 2 to 3 hours completion is a frequent response time for the bdf to report correctly. du command immediately reports free disk space.
..du checks for file existence, whereas bdf also accounts for reserved space.

# du -s /mnt_pnt would summarize

g`d luck
t+-
Little learning is dangerous!
jjeyaprakash
Occasional Advisor

Re: rm files and bdf

Instead of rm command you can use the following method which will show the free space immediately

for eg: you have a file call test in /tmp which occupies more space just try

$cp /dev/null /tmp/test

this will make the file to free up the space, but stll the file will be there with size of 0 bytes

By doing this you can see the free space immediately in BDF command
Sys / Net Admin