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

[SOLVED] Disk Usage at 100%

Scheduled Pinned Locked Moved Cache/Proxy
8 Posts 3 Posters 15.8k Views
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.
  • V
    vhinzsanchez
    last edited by Mar 14, 2016, 5:10 AM Mar 4, 2016, 8:55 AM

    Hi masters ;D,

    My installation is Release 2.1 (had been 2.3 then an upgrade to 2.4 and 2.5 broke and restored a 2.1 release) with the following packages:

    • squid 2.7.9 pkg v.4.3.11

    • squidguard 1.4_4 pkg v.1.9.17

    • lightsquid 2.43

    Anyways, everything was working as expected until one of the VLANs had an issue with DHCP not sending out IPs.  Upon checking, one of our IT noticed that the "Disk Usage" is at 100%…not noticed it beforehand.

    Went up to delete /var/squid/cache and performed squid -z...rebooted that night.  But the Disk Usage is still at 100%.

    [2.1-RELEASE][admin@pfsense.localdomain]/root(19): df -h
    Filesystem    Size    Used  Avail Capacity  Mounted on
    /dev/ad6s1a    140G    129G    235M  100%    /
    devfs          1.0k    1.0k      0B  100%    /dev
    /dev/md0      3.6M    60k    3.3M    2%    /var/run
    devfs          1.0k    1.0k      0B  100%    /var/dhcpd/dev

    [2.1-RELEASE][admin@pfsense.localdomain]/root(20): du -h /var/squid/logs
    128G    /var/squid/logs

    du -h on the files:

    • 48M    /var/squid/logs/access.log

    • 4.3G    /var/squid/logs/access.log.0

    • 6.1M    /var/squid/logs/cache.log

    • 124G    /var/squid/logs/cache.log.0

    • 2.0k    /var/squid/logs/squid.pid

    • 3.8M    /var/squid/logs/store.log

    In the Proxy server: General settings GUI
    Enable logging is ticked/checked.
    Log sore directory = /var/squid/logs
    Log rotate = 7

    And if it matters:
    In Cache Mgmt tab:
    Hard disk cache size = 2048
    Hard disk cache location = /var/squid/cache

    What is cache.log.0 and how to truncate it to retain only 6 months of data (or atleast from January this year)?

    The main aim is to free up most of the disk space which may have been taken by squid cache and logs.

    Thanks in advance.

    ~Vhinz

    1 Reply Last reply Reply Quote 0
    • C
      chris4916
      last edited by Mar 4, 2016, 11:05 AM

      Are you sure you need to keep cache.log ?
      Won't you be able to keep access logs only ?

      Jah Olela Wembo: Les mots se muent en maux quand ils indisposent, agressent ou blessent.

      1 Reply Last reply Reply Quote 0
      • V
        vhinzsanchez
        last edited by Mar 5, 2016, 3:01 AM

        Hi Chris,

        Thanks for the response.  I've read somewhere that I its safe to delete those.  So I deleted and rebooted..no problem except that HD is still at 100%.

        1 Reply Last reply Reply Quote 0
        • V
          vhinzsanchez
          last edited by Mar 8, 2016, 2:14 AM

          Sorry Mis-read it.  My answers below:

          @chris4916:

          Are you sure you need to keep cache.log ?

          Actually, not really sure.  What I have in mind is to clear cache at the end of the day…at 23:59, if at all possible.

          @chris4916:

          Won't you be able to keep access logs only ?

          Apologies, did not clearly understand.  I would like to keep 3-6 months of logs only so as not to fill harddisk with logs.

          I've taken my cue to delete cache here (as recommended by a hero member): https://forum.pfsense.org/index.php?topic=51044.0

          1 Reply Last reply Reply Quote 0
          • K
            KOM
            last edited by Mar 8, 2016, 2:21 PM

            Squid's cache and cache.log are two different things.  Delete cache.log and set squid to rotate logs every week or two so you don't end up with a massive access.log.

            1 Reply Last reply Reply Quote 0
            • V
              vhinzsanchez
              last edited by Mar 11, 2016, 6:50 AM

              @KOM:

              Squid's cache and cache.log are two different things.  Delete cache.log and set squid to rotate logs every week or two so you don't end up with a massive access.log.

              Thanks @KOM.  Can I safely delete the cache.log.0, it is the one consuming HD space (124GB, as shown above).  Additionally, how can I do log rotate?  Is it not enough that I've specified "Log rotate = 7" in Squid (Proxy server: General settings: General tab)?

              1 Reply Last reply Reply Quote 0
              • K
                KOM
                last edited by Mar 11, 2016, 1:51 PM

                Yes you can safely delete cache.log.0.  Any log with a number as a suffix is an archived log and can be deleted.  If you already have squid set to rotate every 7 days then that's all you can do.

                1 Reply Last reply Reply Quote 0
                • V
                  vhinzsanchez
                  last edited by Mar 12, 2016, 5:58 AM

                  Great @KOM, thanks!  Deleted the archived (the .0) access and cache files and it greatly freed up HD spaces and keeps pfsense working.  I've not checked upon reboot but I think it will be okay.

                  Again, many thanks KOM!

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received