My HDD got full - squid



  • Hello all
      i've got 66Gb hard drive and its almost full with 95% ,  what will happen if it reached 100% ? and how can i clear the cache storage ?



  • i've got 66Gb hard drive and its almost full with 95% ,

    You will be able to clear the cache from time to time.

    what will happen if it reached 100% ?

    Never mess with temp files! Perhaps this HDD/SSD/mSATA will be never running again
    and also I hope this is not your system (OS) drive! So an extra drive only for Squid cache
    would be really wise to use.

    and how can i clear the cache storage?

    With a cron job or a script or both together it would go.



  • @BlueKobold:

    i've got 66Gb hard drive and its almost full with 95% ,

    You will be able to clear the cache from time to time.

    what will happen if it reached 100% ?

    Never mess with temp files! Perhaps this HDD/SSD/mSATA will be never running again
    and also I hope this is not your system (OS) drive! So an extra drive only for Squid cache
    would be really wise to use.

    and how can i clear the cache storage?

    With a cron job or a script or both together it would go.

    whats is the command to clear the cache , any idea? am not a pro with linux is there a simple way to clear the cache?



  • whats is the command to clear the cache, any idea?

    This would be not only a command as I see it right, the whole service (Squid) must
    be stopped, the cache flushed and then the service (Squid) must be restarted.

    am not a pro with linux is there a simple way to clear the cache?

    pfSense is based on FreeBSD and not Linux, so Linux commands would be often
    similar but not identical.

    Squid on FreeeBSD should be the right reference to come closer to the point.



  • https://forum.pfsense.org/index.php?topic=51044.0

    
    cd /var/squid/cache
    rm -rf *
    squid -z
    
    


  • squid -z
    cd /var/squid/cache
    rm -rf *

    This is backwards.  Why would you create the cache structure only to delete immediately afterwards??

    cd /var/squid/cache
    rm -rf *
    squid -z
    

  • Rebel Alliance Developer Netgate

    Much faster from a user standpoint:

     <stop squid="">mv /var/squid/cache /var/squid/cache.old
    squid -z
     <restart squid="">rm -rf /var/squid/cache.old</restart></stop>
    

    That way your users aren't down while the rm churns through deleting all those tiny little files/dirs.



  • @KOM:

    squid -z
    cd /var/squid/cache
    rm -rf *

    This is backwards.  Why would you create the cache structure only to delete immediately afterwards??

    cd /var/squid/cache
    rm -rf *
    squid -z
    

    Whoops, i'll fix it


Log in to reply