Operating System - HP-UX
1753325 Members
5111 Online
108792 Solutions
New Discussion юеВ

Re: Space not being returned to /tmp after file detetion

 
SOLVED
Go to solution
BOB BARBA
Contributor

Space not being returned to /tmp after file detetion

A very large temporary file was created in /tmp. We were unable to identify the source of this file but believe that it was created by an on-line user within Oracle Applications performing a query. The file has been deleted but the freespace has not been returned. 'bdf /tmp' still shows /tmp to be 75% full.
1. Why hasn't the space been returned even though the file has disappeared.
2. Is there any way of associating a user to a temporary file prior to deleting it.

Any advice will be very much appreciated. Bob
8 REPLIES 8
Mark van Hassel
Respected Contributor
Solution

Re: Space not being returned to /tmp after file detetion

Hi,

The space is no returned because the process that had the file open still runs. When the proces stops, you'll see that the space is freed.
To check which proces has a file open, use "fuser".

HtH,

Mark
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Emiel van Grinsven
Valued Contributor

Re: Space not being returned to /tmp after file detetion

Hi,

bdf needs some time to 'see' the free space. It checks on inode number, with du -sk you'll see that there should be free space.

try the search option, there where threads about this very recently.

Good luck, Emiel
Clemens van Everdingen
Honored Contributor

Re: Space not being returned to /tmp after file detetion

Hi,

Mark is right.
Probably the oracle users process is holding the space unavailable.

If this user logs out, or you stop and start oracle db the space will be returned.

Regards,
C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
U.SivaKumar_2
Honored Contributor

Re: Space not being returned to /tmp after file detetion

hi,
reboot the server once , the space statistics
will be correct.
regards,
U.SivaKumar
Innovations are made when conventions are broken
Deepak Extross
Honored Contributor

Re: Space not being returned to /tmp after file detetion

Praveen Bezawada
Respected Contributor

Re: Space not being returned to /tmp after file detetion

Hi
As suggested, it is the problem of file handles being active with some processes. You can find the process that is still using it using lsof.

You can download it from

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/

...BPK...
Michael Tully
Honored Contributor

Re: Space not being returned to /tmp after file detetion

Hi,

Once the process has terminated, the space
will be returned as the file will have also been released from memory. You can also use a
handy tool called 'lsof' to assist you
with this type of situation. Here is a link
to where you can download a binary copy
ready to install for your version.

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

HTH
~Michael~
Anyone for a Mutiny ?
Juan Manuel L├│pez
Valued Contributor

Re: Space not being returned to /tmp after file detetion

Hi,
When you choose a file to delete, you have to check if there is a user process over the file, using fuser.
If you want to delete the file anyway, first you have to " empty " the file them delete it:

>
rm
On your situation, it is necesary reboot the system, and the real free space will be returned.
That is because, while a file is being used by a user there is semaphores and memory segments used, if you delete it, the semaphores and memory segments are still in use until you reboot the machine.

I hope this help you.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.