RE: [squid-users] coss configuration example

From: Steven Wilton <swilton@dont-contact.us>
Date: Tue, 15 Aug 2006 11:19:08 +0800

The problem is that the swap.state file could not be renamed. On our
systems, we have the following config line:

cache_swap_log /var/spool/squid/%s

This creates all swap.state files in /var/spool/squid, so the cache user
needs to have write permissions in this directory.

You may be able to fix your problem by making the /cache_log/ directory
writable by the cache user. If there is a swap.state file in the
/cache_log/ directory, and if the directory is not writable by the cache
user, you can give this a try. If it looks ok, just modify the
cache_swap_log entry in the squid conf file.

You may also have a problem because accroding to your e-mail below you have
created a 2048 MB file, but have told squid to use 2500 MB. If you created
the coss file with the "dd" command you sepcified below, you would need to
have the following cache_dir entry in your config:

cache_dir coss /cache_log/coss 2048 block-size=512 max-size=131072

Regards

Steven

> -----Original Message-----
> From: chima s [mailto:chima.s@gmail.com]
> Sent: Monday, 14 August 2006 10:13 PM
> To: Steven Wilton
> Cc: squid mailing
> Subject: Re: [squid-users] coss configuration example
>
> Hi Steven,
>
> I have tried following but it failed
> dd if=/dev/zero bs=1048576 count=2048 of=/cache_log/coss
>
> Part of Squid.conf
> ----------------------
> cache_dir coss /cache_log/coss 2500 block-size=512 max-size=131072
> cache_access_log /var/log/squid/access.log
> cache_log /var/log/squid/cache.log
> cache_store_log none
> cache_swap_log none
>
> Squid was compiled as
> ----------------------------
> ./configure --enable-storeio=coss --enable-coss-aio-ops
> --with-large-files
>
> While starting the squid i am getting error as
> 2006/08/14 19:36:37| WCCP Disabled.
> 2006/08/14 19:36:37| Ready to serve requests.
> 2006/08/14 19:36:37| COSS: /cache_log/coss: Rebuilding (0 % completed
> - 1/2500 stripes)
> 2006/08/14 19:36:39| COSS: /cache_log/coss: Rebuilding (5 % completed
> - 126/2500 stripes)
> 2006/08/14 19:36:40| COSS: /cache_log/coss: Rebuilding (10 % completed
> - 251/2500 stripes)
> 2006/08/14 19:36:42| COSS: /cache_log/coss: Rebuilding (15 % completed
> - 376/2500 stripes)
> 2006/08/14 19:36:43| COSS: /cache_log/coss: Rebuilding (20 % completed
> - 501/2500 stripes)
> 2006/08/14 19:36:44| COSS: /cache_log/coss: Rebuilding (25 % completed
> - 626/2500 stripes)
> 2006/08/14 19:36:45| COSS: /cache_log/coss: Rebuilding (30 % completed
> - 751/2500 stripes)
> 2006/08/14 19:36:47| COSS: /cache_log/coss: Rebuilding (35 % completed
> - 876/2500 stripes)
> 2006/08/14 19:36:48| COSS: /cache_log/coss: Rebuilding (40 % completed
> - 1001/2500 stripes)
> 2006/08/14 19:36:49| COSS: /cache_log/coss: Rebuilding (45 % completed
> - 1126/2500 stripes)
> 2006/08/14 19:36:50| COSS: /cache_log/coss: Rebuilding (50 % completed
> - 1251/2500 stripes)
> 2006/08/14 19:36:52| COSS: /cache_log/coss: Rebuilding (55 % completed
> - 1376/2500 stripes)
> 2006/08/14 19:36:53| COSS: /cache_log/coss: Rebuilding (60 % completed
> - 1501/2500 stripes)
> 2006/08/14 19:36:55| COSS: /cache_log/coss: Rebuilding (65 % completed
> - 1626/2500 stripes)
> 2006/08/14 19:36:57| COSS: /cache_log/coss: Rebuilding (70 % completed
> - 1751/2500 stripes)
> 2006/08/14 19:36:58| COSS: /cache_log/coss: Rebuilding (75 % completed
> - 1876/2500 stripes)
> 2006/08/14 19:36:59| COSS: /cache_log/coss: Rebuilding (80 % completed
> - 2001/2500 stripes)
> 2006/08/14 19:37:01| COSS: /cache_log/coss: Rebuilding (85 % completed
> - 2126/2500 stripes)
> 2006/08/14 19:37:02| COSS: /cache_log/coss: Rebuilding (90 % completed
> - 2251/2500 stripes)
> 2006/08/14 19:37:02| COSS: /cache_log/coss: Rebuilding (95 % completed
> - 2376/2500 stripes)
> FATAL: storeCossDirCloseTmpSwapLog: rename failed
>
>
> I don't know what went wrong.
>
> Regards
> Chima
>
> On 8/5/06, Steven Wilton <swilton@q-net.net.au> wrote:
> >
> > ----- Original Message -----
> > From: "chima s" <chima.s@gmail.com>
> > To: "squid mailing" <squid-users@squid-cache.org>
> > Sent: Friday, August 04, 2006 8:24 PM
> > Subject: [squid-users] coss configuration example
> >
> >
> > > Hi,
> > >
> > > Can any one give the squid configuration to use coss cache_dir.
> > >
> > > My system info
> > >
> > > Fedora Core release 3
> > > Kernel : 2.6.10
> > > Squid : squid-2.6.STABLE2-20060804
> > > MEM: 2GB
> > > HD : 2*72 GB SCSI
> > > System Filesystem: reiserfs
> > >
> > > How COSS_MEMBUF_SZ is calculated for given cache_dir size
> > >
> > > Regards
> > > Chima
> > >
> >
> > The minimum config for a COSS dir is the following (for
> 100MB cache_dirs):
> > cache_dir coss /var/spool/squid/coss 100 block-size=512
> max-size=131072
> > or
> > cache_dir coss /dev/sdb1 100 block-size=512 max-size=131072
> >
> > If you set COSS to write to a flie, you must create the
> file manually. To
> > do this, you can run:
> > dd if=/dev/zero bs=1048576 count=<size> of=<file>
> >
> > If you set COSS to write direct to a block device, you need
> to make sure
> > that the cache user has write permissions on the block device.
> >
> >
> > The COSS_MEMBUF_SZ does not get set on a per-device basis.
> The magic number
> > you need to be aware of is the block-size, which limits the
> size of the
> > cache. The valid numbers are:
> >
> > block-size=512 - 8GB Max cache_dir size
> > block-size=1024 - 16GB Max cache_dir size
> > block-size=2048 - 32GB Max cache_dir size
> > block-size=4096 - 64GB Max cache_dir size
> > block-size=8192 - 128GB Max cache_dir size
> >
> > Steven
> >
> >
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.10.10/418 - Release
> Date: 14/08/2006
>
>

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.10/418 - Release Date: 14/08/2006
 
Received on Mon Aug 14 2006 - 21:19:15 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:02 MDT