[squid-users] Is it safe to resize a rock storage file?

duanyao duanyao at ustc.edu
Wed Oct 18 03:54:36 UTC 2017


在 2017/10/16 下午10:59, Alex Rousskov 写道:
> On 10/16/2017 06:26 AM, duanyao wrote:
>
>> Is it safe to resize a rock storage file as follow (while squid is not
>> running)?
>>
>> 1) Increase a rock storage file by increasing the size specified in the
>> configuration file;
> I would recommend running truncate after this as well because that is
> what Squid does when it initializes the database (squid -z).
>
Ok, I'll do that.
>> 2) Decrease a rock storage file by decreasing the size specified in the
>> configuration file and run `truncate --size <new size> rock_file`;
>>
>> By "safe" I mean no rubbish data will ever be delivered to clients after
>> resizing, while loss of some cached data is OK.
> I have not tested this, but I believe the above operations are safe to
> perform while Squid is not running. The second operation may generate
> many warnings during Squid startup as Squid discovers and complains
> about corrupted entries.
Thanks. I do see those warnings in the log.
>
> Alex.





More information about the squid-users mailing list