Re: large file removal / ext2

Nigel Metheringham (Nigel.Metheringham@ThePLAnet.net)
Fri, 10 Oct 1997 09:47:46 +0100


tytso@MIT.EDU said:
} Actually, it was the act of dropping down to single-user which caused
} the process which was holding the file to exit, which caused the space
} to be reclaimed. If you know what the file is, you can also simply
} restart the process without needing to take the whole machine down to
} single-user mode. Certain processes, like syslog, are actually quite
} well behaved in that when they receive a HUP signal, they will close
} and reopen their output log files, which causes the space to be
} appropriately reclaimed.

Getting slightly off-topic here....
*Before* you delete the file, mv it to another name (on the same
filesystem) to ensure nothing else is going to start writing to the file
in the period between the next operations. The use lsof or a similar
utility to tell you which processes have the file open. You can then sort
them out and delete the file. [I think this can be done after deleting
the file, but you then have to work with inode numbers and the like which
makes things much more difficult]

Nigel.

-- 
[ Nigel.Metheringham@theplanet.net   -  Systems Software Engineer ]
[ Tel : +44 113 251 6012                   Fax : +44 113 224 0003 ]
[            Friends don't let friends use sendmail!              ]