shall squid be stopped in order to run "squid -z"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

shall squid be stopped in order to run "squid -z"

Rafael Akchurin

Hello all,

 

Sorry my google fu failed today. I could not find the answer to the subj.

The thing is we are building the UI for Squid within our ICAP project and now need to let the admin “re-initialize” the cache_dir.

 

Shall the squid daemon be stopped while doing this?

Or ideally, is it possible to pass the *new* directory path to “squid –z” and then make a change in the conf followed by “squid –k reconfigure” and erasing the old dir later (how later?).

 

 

Thanks to all who replies.

Best regards,

Rafael Akchurin

Diladele B.V.

https://www.diladele.com

 


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: shall squid be stopped in order to run "squid -z"

Alex Rousskov
On 08/05/2017 10:59 AM, Rafael Akchurin wrote:
> The thing is we are building the UI for Squid within our ICAP project
> and now need to let the admin “re-initialize” the cache_dir.

> Shall the squid daemon be stopped while doing this?

Yes.


> Or ideally, is it possible to pass the **new** directory path to “squid
> –z” and then make a change in the conf followed by “squid –k
> reconfigure” and erasing the old dir later (how later?).

The combination is neither ideal nor fully supported today IIRC. The
ideal would be just your second part -- change squid.conf and run "squid
-k reconfigure".

The first part (i.e., a dedicated "squid -z" run concurrent with the
primary Squid instance) is not ideal for many reasons that I do not have
time to detail here (but you may be able to find some relevant
references by searching for -z in Bugzilla and squid-dev archives). We
need to start supporting cache_dir initialization dynamically, but
nobody is working on that difficult project right now AFAIK.

As for "how later?", a correct implementation should probably remove the
old cache_dir when it is no longer used by any process. That check is
going to be OS- and possibly fs-specific. Squid could also log a message
when it stops using a removed cache_dir, but I am not sure that polling
for such messages is a better approach -- what if Squid crashes before
emitting that message, for example?


HTH,

Alex.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...