Re: [squid-users] Why squid -z

From: Ric <lists@dont-contact.us>
Date: Wed, 27 Feb 2008 04:09:57 -0800

On Feb 27, 2008, at 12:29 AM, Angela Williams wrote:

> On Tuesday 26 February 2008, Ric wrote:
>> On Feb 26, 2008, at 2:25 AM, Angela Williams wrote:
>>> On Tuesday 26 February 2008, Ric wrote:
>>>> I'm wondering why we require "squid -z" before starting up Squid
>>>> for
>>>> the first time. Is there some reason why Squid shouldn't do this
>>>> automatically when necessary?
>
>>> Just a simple scenario?
>>> I use a separate cache file system for all my many squid boxes.
>>> Now for some reason one of the boxes get bounced and my squid cache
>>> filesystem
>>> fails to mount but squid comes up happily and say Oh look I don't
>>> have any
>>> cache directory structure so let me make one! Root filesystem is
>>> limited in
>>> space and then this dirty great big directory structure is created
>>> and then
>>> gets used by squid. In the twinkling of an eye the root filesystem
>>> is full!
>>>
>>> Ever tried to solve this kind of problem when the server is hundreds
>>> of
>>> kilometers away? Its phun!
>>>
>>> Give me squid -z!!
>
>> I'm wondering if this is better solved with a directive in squid.conf
>> to disallow (or allow if you prefer) the automatic creation of the
>> cache structure.
>
> To me this does not make sense really.
> I setup a squid server, create the squid cache structure and start
> squid.
> I can count the numbers of time I have had to rebuild a fresh cache
> structure
> on the fingers of 1 hand. Replace a fault harddrive, increase or
> decrease the
> cache size and thats it!
>
> Cheers
> Ang

In the reverse proxy case for a development site or large traffic
installation, where you may be changing the cache policies fairly
frequently, it's not all that uncommon to have to nuke the proxy cache
to clear out the old stuff. If you do this enough times, the number
of steps is a bit annoying...

squid -k shutdown
wait....
mv /some/god/awful/long/path/to/cache junk
squid -z
squid
rm -r junk

I ended up making a shell script to automate this so it isn't a big
deal. It just seemed to me that squid could be a little smarter about
this.

Ric
Received on Wed Feb 27 2008 - 05:10:12 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:05 MST