Re: Clean up cache directory

From: Duane Wessels <wessels@dont-contact.us>
Date: Fri, 15 Oct 1999 14:08:39 -0600

On Fri, 15 Oct 1999 Robert.Rose@centrelink.gov.au wrote:

> When we originally compiled Squid, we didn't change from truncate to
> unlink, we'd carefully planned for inode usage based on 256 files in the
> second level directories. Unfortunately since the old files are truncated,
> not unlinked and Squid isn't reusing them, we've got a lot of zero length
> files scattered through our cache directory tree.
>
> How can we go about cleaning them up? I'm not keen to do "find /cachedir
> -size 0c -exec rm {}\;", and I'm not keen on stop/starting squid on a
> regular basis to go back to 00000000 and have it produce Size mismatch
> entries as above. I realise a recompile to use unlink instead of truncate
> may be the best option, but are there any other options? What happens when
> the cache file number eventually gets to FFFFFFFF?

You can simply turn on unlink in defines.h and run the new version
of Squid. The "storeClean" thread will remove the zero-length
files from your directories, but it may take a day or two
to get all of them.

Duane W.
Received on Fri Oct 15 1999 - 14:17:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:55 MST