Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    My HDD got full - squid

    Cache/Proxy
    5
    8
    685
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mkaabiq8 last edited by

      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 ?

      Regards
      MOhsen

      1 Reply Last reply Reply Quote 0
      • ?
        Guest last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • M
          mkaabiq8 last edited by

          @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?

          Regards
          MOhsen

          1 Reply Last reply Reply Quote 0
          • ?
            Guest last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • A
              aGeekhere last edited by

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

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

              Never Fear, A Geek is Here!

              1 Reply Last reply Reply Quote 0
              • KOM
                KOM last edited by

                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
                
                1 Reply Last reply Reply Quote 0
                • jimp
                  jimp Rebel Alliance Developer Netgate last edited by

                  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.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • A
                    aGeekhere last edited by

                    @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

                    Never Fear, A Geek is Here!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post