LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2012, 07:10 AM   #1
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Rep: Reputation: 2
squid3 cache_dir in different partition problem


hi! i managed to install and can successfully start squid when it's using the default cache_dir (/var/spool/squid). but when i changed the cache_dir to a separate partition the squid says it is worked but its not
the /cache/ directory is already owned by the squid user and has 710 permission, just like the permission of /var/cache/squid.

what else could be the problem?
thanks

cache.log says

2012/08/15 08:43:47| Rebuilding storage in /c1 (DIRTY)
2012/08/15 08:44:36| Rebuilding storage in /c2 (DIRTY)
2012/08/15 08:45:24| Rebuilding storage in /c3 (DIRTY)
2012/08/15 08:46:12| Rebuilding storage in /c4 (DIRTY)
2012/08/15 08:47:00| Rebuilding storage in /c5 (DIRTY
 
Old 08-16-2012, 12:27 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Hi,

When you define a new cache_dir for squid, you have to use first of all:
Code:
squid -z
to create the new swap directories structure.

Regards
 
Old 08-16-2012, 01:33 PM   #3
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
i did and it create the swap directory
but squid is not working
the default is
cache_dir aufs /cache/squid 100 16 256
(16 256)
but i read that 16 must be changed depending on ur hard disk size and i have 2 TB

it is here http://blog.neu.edu.cn/elm/archives/84
and some where else
so if i change 16 to 2000 it will not work but if i put it 16 it will work
whats the problem why i cant change and why it said dirty !!
 
Old 08-16-2012, 01:51 PM   #4
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
and after that in cache.log
full of :

Code:
NULL

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded}
NULL

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded}
NULL

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded}
NULL

Content-T
Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded}
NULL

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded}
NULL

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded}
NULL
 
Old 08-16-2012, 04:09 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
the default is
cache_dir aufs /cache/squid 100 16 256
(16 256)
but i read that 16 must be changed depending on ur hard disk size and i have 2 TB

it is here http://blog.neu.edu.cn/elm/archives/84
and some where else
so if i change 16 to 2000 it will not work but if i put it 16 it will work
whats the problem why i cant change and why it said dirty !!
16 is the 1st level directories in cache. Better leave it as is. If you want to assign more space for squid cache, increase 100 (that is 100MB) and leave the other values at their defaults. Also better change aufs to ufs, as it's the default storage format.
Then delete everything under the /cache directory and re-run "squid -z" to re-create the cache directory structure
 
Old 08-16-2012, 04:55 PM   #6
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
yes you are right i told you when i left it 16 the squid work again
but still have the problem while iam restart it give me

2012/08/15 08:43:47| Rebuilding storage in /c1 (DIRTY)
2012/08/15 08:44:36| Rebuilding storage in /c2 (DIRTY)
2012/08/15 08:45:24| Rebuilding storage in /c3 (DIRTY)
2012/08/15 08:46:12| Rebuilding storage in /c4 (DIRTY)

other servers it give (CLEAN) why here is dirty !!

---------- Post added 08-16-12 at 04:56 PM ----------

thank you very much
 
Old 08-16-2012, 05:33 PM   #7
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
but on another server i can change 16 and it work perfect and it didnt give DIRTY !!
 
Old 08-17-2012, 12:19 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
Originally Posted by !! hack-back !! View Post
yes you are right i told you when i left it 16 the squid work again
but still have the problem while iam restart it give me

2012/08/15 08:43:47| Rebuilding storage in /c1 (DIRTY)
2012/08/15 08:44:36| Rebuilding storage in /c2 (DIRTY)
2012/08/15 08:45:24| Rebuilding storage in /c3 (DIRTY)
2012/08/15 08:46:12| Rebuilding storage in /c4 (DIRTY)

other servers it give (CLEAN) why here is dirty !!

---------- Post added 08-16-12 at 04:56 PM ----------

thank you very much
Better start from scratch. Stop squid, delete everything under /cache, recreate the cache (using the -z option) and then start squid normally.
If the problem persists, it could be something else (like a disk problem).


Quote:
but on another server i can change 16 and it work perfect and it didnt give DIRTY !!
If you start from scratch normally it works. You can change 16, but not to 2000 like in your 1st post. Better take a look here about cache_dir options.

Last edited by bathory; 08-17-2012 at 12:22 AM. Reason: additional reply
 
Old 08-17-2012, 12:58 AM   #9
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
thank you i changed the hdd and it work it give CLEAN now
whats about scratch ?? what it is and what it do ?
i didnt use this in old servers i made !!
and there is any formula to know how much 16 will be every time i increase my hdd size ??
thanks very much
 
Old 08-17-2012, 02:37 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
whats about scratch ?? what it is and what it do
Start from scratch means delete everything you've done and start from the beginning


Quote:
and there is any formula to know how much 16 will be every time i increase my hdd size ??
I don't know of any formula, but you can use google to find out how to optimize squid performance in general

Regards
 
Old 08-17-2012, 07:21 AM   #11
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
thank you bathory you are gr8 person
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem to configure squid3.0 ani555 Linux - Newbie 3 03-20-2010 02:30 AM
squid proxy server cache_dir in different partition problem tr3s Linux - Server 8 10-16-2009 12:43 AM
problem with cache_dir in squid sohailkmu Linux - Newbie 25 10-22-2008 11:10 PM
IPTables and Squid3 problem merlot2 Linux - Networking 1 09-09-2008 09:16 PM
Changing default cache_dir on squid3 not working pliqui Linux - Software 3 12-12-2007 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration