Em 27-12-2009 15:02, Hung Nguyen escreveu:
Jefferson Diego wrote:
Em 27-12-2009 14:17, Hung Nguyen escreveu:
hello folks,
Can I specify 2 cache_dir directives for one squid server? I meant two
cache_dir on 2 different disk to avoid disk failure ?
Thanks!
Yes, you can. You can specify how many cache_dir's you want, each in
the same partition, or in different partition or even in a different
drive.
But, it will not avoid problems if you have a disk failure. If the
squid process try to write in a cache_dir, and this is not available
(imagine that your drive is down, due to a failure), it will crash...
But why are you worried about a failure? Are your disks failling?
Thank for reply,
No, I just plan for a bad day. Do you have any advice for me in this
situation: 2 cache_dir on different disk is better or just one cache_dir
on a disk with just one partition in it?
Ok... about the event of a "bad day" with your disks, I think that the
right thing is to write a kind of daemon script to analyse the
availabity of partitions, and if some of them are down, rewrite
squid.conf without it and restart squid quickly.
And about your situation, 2 or more cache_dir on different disk are
better, 'cause the squid process can parallelize I/O requests, improving
the transfer performance.
(And sorry if I said some incompreensible thing, 'cause I'm brazilian
and I still have a poor english)