squid 2.2.STABLE4 truncates files but does not delete them

From: Catalin Muresan <cata@dont-contact.us>
Date: Tue, 21 Sep 1999 12:11:58 +0300

         Hi everybody,
 
         I have installed squid-2.2.STABLE4 (and before STABLE2) but because
         unlinkd does not delete the files from the cache, my inodes count on
         the cache partition keep increasing, finally reaching the limit and
         squid dies (no space left on device). I've also browsed the archive
         and saw that there is a similar problem on Solaris (FAQ 14.4) but I
         think that this is not the case (Linux here, different filesystem).

        system specs:
        PII350, RedHat 5.2, kernel 2.2.7-ac1, squid running on 4G scsi disk

        [cata@atv cata]$ df /dev/sdb1
        Filesystem 1024-blocks Used Available Capacity Mounted on
        /dev/sdb1 4156579 3930447 226132 95% /var/cache
        [cata@atv cata]$ df -i /dev/sdb1
        Filesystem Inodes IUsed IFree %IUsed Mounted on
        /dev/sdb1 529408 345224 184184 65% /var/cache
        [cata@atv cata]$ rpm -q squid
        squid-2.2.STABLE4-0.5.2

         I've seen in unlinkd.c this:
 
 #if USE_TRUNCATE_NOT_UNLINK
         truncate(buf, 0);
 #else
         unlink(buf);
 #endif
 
         and I think that undefining USE_TRUNCATE_NOT_UNLINK in defines.h it
         should do the thing I want (cleanup) but I noticed the comment in
         Changelog that swap.state is truncated and not unlink-ed. Can squid
         handle this change? (creat-ing not open-ing the swap.state and also
         cache files). Which is the correct/clean solution?
 
         in the mean time I am doing 'find -type f -size 0 -exec rm -f {} \;'
         every 2-3 days ;)
 
         bye
 

-- 
 Catalin Muresan
 CODEC Electronic Products
 Internet Services Department
 431118.03 392214.03
Received on Tue Sep 21 1999 - 03:32:11 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:29 MST