Re: [squid-users] moving the cache

From: Duane Wessels <wessels@dont-contact.us>
Date: Thu, 11 Dec 2003 20:46:29 -0700 (MST)

On Fri, 12 Dec 2003, George Dominguez wrote:

> Good day, List
>
> I have added a new scsi disk to our squid server, and would like to know
> which is the best way to move the cache to the new scsi disk.

First, make sure Squid is not running.

Assuming that your 'mv' can move directories between filesystems
(most can), you can just do:

    # mv /from/oldcachedir /to/newcachedir

then update cache_dir in squid.conf and restart.

This procedure will take a while, depending on the size of your cache
and the speed of your system.

If you don't want to have any interruption of service, and can wait
a really long time (like days or weeks), you can use this trick:

Add a new cache_dir and mark the old cache_dir as read-only. New
objects will get stored to the new location, and you'll get cache
hits from the old one. After some amount of time, say when the new cache
dir fills up, you can remove the old one.

Duane W.
Received on Thu Dec 11 2003 - 20:46:30 MST

This archive was generated by hypermail pre-2.1.9 : Thu Jan 01 2004 - 12:00:10 MST