[SOLVED] Disk Usage at 100%
-
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/logsdu -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 = 7And if it matters:
In Cache Mgmt tab:
Hard disk cache size = 2048
Hard disk cache location = /var/squid/cacheWhat 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
-
-
Are you sure you need to keep cache.log ?
Won't you be able to keep access logs only ? -
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%.
-
Sorry Mis-read it. My answers below:
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.
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
-
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.
-
@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)?
-
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.
-
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!