High disk usage



  • Greetings Wizards,

    I'm in the process of setting up a virtual pfSense machine. Currently, it's on an isolated network with no traffic going through it. I recently noticed that disk usage is very high, df -h shows the following:

    http://imgur.com/nGPB2tM

    As you can see, /dev/gpt/pfsense is at 85% capacity.

    I only have a few packages installed, open-vm-tools, snort, squid3, squidguard…

    I've tried clearing all the logs I can find, but I don't seem to be able to reduce disk usage in any way. It seems very strange to me, the VM is currently on an isolated network. I wouldn't expect it to be logging much of anything.

    Does anyone have any ideas what could be using all of the disk space?

    Many Thanks.


  • Banned

    How about the Squid cache?  ::)



  • I've tried hitting the "Clear Disk Cache NOW" button under local cache - no change in disk usage.



  • Shell in and then run:

    du -Pshx /*
    

    This will tell you which folder(s) are using all your space.  From there you can start investigating the larger folders.



  • Thanks KOM, that was very useful.

    I ran:```
    du -h -P shx /* | sort -h

    
    and it showed that the Squid Proxy logs were taking up almost all the available storage:
    
    [http://imgur.com/a/RTRDK](http://imgur.com/a/RTRDK)
    
    I couldn't see any obvious way to clear /var/squid/logs, (There didn't appear to be any sort of button under Squid Proxy Server > General > Logging Settings - am I just blind?) resetting system logs didn't seem to make any difference either so I manually deleted the files via command prompt and did a reboot.
    
    Disk space recovered.
    
    Help much appreciated.
    
    Cheers,
    Wizard1

  • Banned

    I'd suggest to revisit the 'Rotate Logs' setting in Squid and configure something there.



  • Thanks for the suggestion doktornotor, I've gone ahead and set the logs to rotate every few days.


  • Banned

    Well no problem, I'd put a default value there but - users need to enable logging first, and when they do so, they are in a better position to pick an appropriate value for that depending on their HDD space.



  • Just curious, how many days do you guy set on the rotate cache?  And also, any other tip on how to make space for HDD?



  • @wizard1:

    resetting system logs didn't seem to make any difference either so I manually deleted the files via command prompt and did a reboot.

    Disk space recovered.

    Can I ask on how you did the manual deleting of files?

    I'm experiencing this now:

    845M /usr
    43G /var

    TIA!

    ast