rm'ed files' space remains till reboot?

rm'ed files' space remains till reboot?

Post by Hi Ho Silv » Tue, 24 Jan 1995 09:34:48




$What causes removed files' space to remain [according to /usr/bin/df] and not
$be freed until a reboot?

   Holding the file open while you delete it.  The file's space will
remain allocated until such time as the file is closed, at which time
it will be returned as free space.
--
|I know that sometimes my jaw clicks when I eat.  Void where prohibited.|
|Have you seen this boy?  Lust never sleeps.  I say hurl.  Honey, I'm   |
|home. _________________________________________________________________|

 
 
 

rm'ed files' space remains till reboot?

Post by Stephen Bayn » Tue, 31 Jan 1995 21:56:11


: What causes removed files' space to remain [according to /usr/bin/df] and not
: be freed until a reboot?

: This problem is hampering our application which is dynamically creating, and
: subsequently deleting, files.  After several days, the disk becomes "full",
: and only a reboot [which is NOT desirable in the operational environment] can
: remedy the situation.

You don't say if your application is one long running process but the
implication is that it is. Do you get your disk space back if you kill the
application without rebooting the system?

I assume you have checked /tmp is not filling up.

The most likly posibility is that some long running program is not closing
its temporary files even though it is removing them. Open files will remain
on disk even if rm'ed untill they are closed (which will happen when the
program dies).

Another possibility is your application or something else long running is
continually growing its virtual memory. ps should be able to spot this.
If the process virtual size keeps growing check the code for memory leaks.

--

Philips Semicondutors Ltd
Southampton                                 My views are my own.
United Kingdom

 
 
 

1. rm'ed files' space remains till reboot?


Some process still has an open file descriptor on the files involved.
The filesystem doesn't reclaim the space until all file-open count on the
file falls down to zero, even if the file doesn't appear on any directory
listing.

When you reboot the system, the offending process is terminated, and the
free'd space is then reclaimed by the filesystem.
--
+---------------------------------------------------------------------+

+---------------------------------------------------------------------+

2. Creating a Windoz SHARE <-- How to?

3. Moving 'rm'ed files to /tmp?

4. RAID using existing disks -mf

5. "rm: can't unlink 'files'",can't delete files

6. gcc after Red Hat 5.1 Installation

7. wield directory entry for tar'ed gzip'ed files

8. Can you recover rm'ed files on a _single user_ system?

9. re-linking rm'ed, open files

10. FTP'ed files default to '-rw-r--r--' i need '-rw-------'

11. last: telnet'ed in or ssh'ed in?

12. rm'ing an open file (was Re: Where has all my disk space gone?)