Re: [squid-users] what should squid -z do

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 04 Feb 2013 16:43:27 +1300

On 4/02/2013 7:54 a.m., Eliezer Croitoru wrote:
> <snip>
> Why squid should not create a cache_dir if one dosn't exits at startup?
> What side effects can come from that?

We have the occasional problem with network shares or broken HDD, that
the cache disk is not available at startup time. Squid normal startup is
required to abort or run in memory-only mode if this happens.
Initializing a cache_dir unconditionally can lead to some bad problems,
so we make it a manual step.

   NP: as mentioned earlier, we are missing a command-line or squid.conf
option to indicate that memory-only mode is allowed.

The side effects are initializing sub-directories inside a HDD mount
point before it mounts, preventing the mount from working. Possibly
over-flowing a small local HDD with cache files which were expected to
be stored on a much larger background SAN system. That takes out the
whole server Squid is running on.

>
> It can more complex but a "check", "reset", "build" flags can be added
> to the -z like in -k parse|...|..| while having a default to "build"
> which is what it does's now.
>
> The "build" will be the default and compatible with the current -z
> flag works.

Nice idea.

However, these operations are only needed occasionally and I am hopng to
build that functionality into a tool outside of the main proxy binary.
We have a set of *dump tools and the squidpurge tool, an the -z
functionality which need to be cleaned up and can be aggregated in a
separate binary. If we do it right that tool can be used safely at any
time, whether or not Squid is running, and can utilize the UDS sockets
to update the workers memory indexes as well.

Amos
Received on Mon Feb 04 2013 - 03:43:33 MST

This archive was generated by hypermail 2.2.0 : Fri Feb 08 2013 - 12:00:03 MST