Operating System - HP-UX
1835989 Members
3433 Online
110088 Solutions
New Discussion

Re: Free space not getting updated immediately

 
Sajith Mannadiar
Occasional Advisor

Free space not getting updated immediately

Hi,

We have a hp715 w/s with hpux 10.2. We run an application on this which
generates a log file of around 800MB within a few days.

We run a cron job to remove this file once in a week.

After removing this file also, the bdf ouput shows 100% used. If the server is
rebooted it will come down to 49%.

Once we removed this file and left the system for 2 days. But the free space
was not updated. Only when we rebooted the server it shows 49% used.


Can some one help us ???

Thanks in advance

Sajith
6 REPLIES 6
Melvyn Burnard_1
Regular Advisor

Re: Free space not getting updated immediately

I suspect you are removing a file that is open at the time of removal, which
generally causes bdf to continue reporting that the space is in use, whereas
using df or du should show the space recovered. If this is the case, then you
could try halting the application first, then doing the removal or truncation,
and then restarting the application.
Amir Fridman_1
New Member

Re: Free space not getting updated immediately

Hi

Try and use the command lsof - list open files .
This will help you to see the open file that was created by the process you
run.

Then stop this process and the free space will be shown on the file system.

Try and use lsof "File name" or
lsof " Device name " .
(You can read the man page).
And then you will find the pid of the process that run the open file.
Joey Sta. cruz_1
New Member

Re: Free space not getting updated immediately

Amir,

You mentioned on your reply to use lsof command to get the updated size of a
file. We tried using this command using root account but it seems that we dont
have this command in place on our system. By the way, we are on 10.20
version. I even check the man page but no entry of this command.

Please advise how can we have this command installed

Regards
Joey
Steve White_8
Frequent Advisor

Re: Free space not getting updated immediately

I think that you should try fuser -cu directory name. This will show you the
open file and the pid that has that file.
Douglas Davis_2
Occasional Advisor

Re: Free space not getting updated immediately

'lsof' is not provided by HP as part of your basic HP-UX OS. Therefore, a 'man'
page is not avaiable for this tool. 'lsof' is a shareware program that must be
downloaded on your system & installed by you. However, it sounds like you do
not need this tool. You already know the name of the process that is creating
this file. I believe what is happening on your system is:

A pesky variant of a file that is filling a file system is an unlinked file to
which some process is still writing. When a process opens a file and then
unlinks it, the file's resources remain in use by the the process, but the
file's directory entries are removed. Hence, even when you know the directory
where the file once resided, you can't detect it with 'ls'.

This can be an administrative problem when the unlinked file is large, and the
process that holds it open continues to write to it. Only when the process
closes the file will its resources, particularly disk space, be released.

Like the advice given ealier, by Melvin, close the process that is creating
this file and then remove the file. This should do it - just as if you were
rebooting your system.

Go to a HP shareware Web site & look up 'lsof' or check out HP's Knowledge tool
for more information about this program.

Good Luck
Jim Butler_4
Advisor

Re: Free space not getting updated immediately

Try bcheckrc.