Free up space, disk storage >80%
-
@stephenw10 Well that's much easier. :) Though reinstalling would get OP to ZFS.
-
Yup, but not something I'd recommend doing without a fall back plan! growfs like that is only ever normally run at first boot. Though I have used it on older VMs in exactly this situation.
-
Yeah, we are building a new setup, but now it gets kind of stressed...
But you dont see or know if there are files or logs I could clear out until the new setup is up and running?
-
Mmm, it still shouldn't be anywhere near that full. Maybe you have a very large number of small files are exhausting inodes. Try:
df -i
-
This is my output of df -i
Filesystem 512-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/ufsid/5edf741a475fe581 38557496 29511840 5961064 83% 39858 2528332 2% / devfs 2 2 0 100% 0 0 100% /dev tmpfs 8192 2488 5704 30% 394 13942 3% /var/run tmpfs 8192 2952 5240 36% 500 13836 3% /var/run devfs 2 2 0 100% 0 0 100% /var/dhcpd/dev
-
@RobinH said in Free Disk space >80%:
/dev/ufsid/5edf741a475fe581 38557496 29511840 5961064 83% 39858 2528332 2% /
The number of total available 512 blocks is 38557496, so divide that number by 2 (half a kilobytes or 512 bytes) and you get 19M bytes, close to 18 Mbytes as mentioned above.
You didn't do this ?
@stephenw10 said in Free Disk space >80%:
To do it run touch /root/force_growfs then reboot.
or you did an nothing changed ?
Actually strange : the main advantage of using a VM is that you can do what you want with the file system, .... and you can't ?
These pfSense packages : acme, Openvpn-client-export, and Telegraf don't add use more disk space over time.
But Haproxy : I'm not sure.
Status_traffic_totals : I'm pretty sure this one produces a lot of data - and that is stored some whereAnyway : I still will advise you to use the ZFS file system, and the means a "re install" (with a VM that's a 5 minutes job if you have a slow machine ^^)
Hummm : the other partition knows as "swap" takes up the other 60-18=42 ?
There is also a third 'boot' partion, but that one is (should be) a couple of Megas max. -
@Gertjan said in Free Disk space >80%:
Status_traffic_totals
For me running:
find /var/db/ -type d -ls | sort -n -r
Showed that my ntopng and vnstat (aka Status_traffic_totals) databases were out of control. I have them nicely tamed now:
find /var/db/ -type d -ls | sort -n -r 21693 1 drwxr-x--- 2 nut nut 3 May 23 19:31 /var/db/nut 817 1 drwxr-xr-x 2 nobody nobody 2 Oct 11 12:28 /var/db/ntopng/rrd/graphics 816 1 drwxr-xr-x 3 nobody nobody 3 Oct 11 12:28 /var/db/ntopng/rrd 815 1 drwxr-xr-x 3 nobody nobody 3 Oct 11 12:28 /var/db/ntopng 388 1 drwxr-xr-x 2 redis redis 2 Feb 17 2023 /var/db/redis 276 17 drwxr-xr-x 2 root wheel 5 Mar 15 2023 /var/db/pfblockerng/dnsblalias 275 1 drwxr-xr-x 2 root wheel 4 Oct 11 00:15 /var/db/pfblockerng/dnsblorig 273 1 drwxr-xr-x 2 root wheel 2 Mar 12 2023 /var/db/pfblockerng/permit 272 1 drwxr-xr-x 2 root wheel 2 Mar 12 2023 /var/db/pfblockerng/match 271 17 drwxr-xr-x 2 root wheel 13 Oct 11 12:15 /var/db/pfblockerng/deny 270 1 drwxr-xr-x 2 root wheel 2 Mar 12 2023 /var/db/pfblockerng/native 269 17 drwxr-xr-x 2 root wheel 13 Oct 11 12:15 /var/db/pfblockerng/original 268 17 drwxr-xr-x 11 root wheel 15 Oct 11 12:15 /var/db/pfblockerng 256 1 drwxr-x--- 2 _dhcp _dhcp 2 Aug 21 08:00 /var/db/dhcpcd 251 1 drwxr-xr-x 2 root wheel 3 Oct 11 12:25 /var/db/vnstat 177 1 drwxr-xr-x 2 root wheel 2 Mar 12 2023 /var/db/pfblockerng/ET 151 1 drwxr-xr-x 2 root wheel 4 Oct 10 00:15 /var/db/pfblockerng/dnsbl 138 1 drwxr-xr-x 2 root wheel 2 Oct 10 08:24 /var/db/zfsd/cases 137 1 drwxr-xr-x 2 root wheel 2 Oct 10 08:24 /var/db/portsnap 136 1 drwxr-xr-x 2 root wheel 2 Oct 10 08:24 /var/db/mtree 135 1 drwx------ 2 root wheel 2 Oct 10 08:24 /var/db/freebsd-update 134 1 drwxr-xr-x 2 ntpd ntpd 2 Oct 10 08:24 /var/db/ntp 133 1 drwxr-xr-x 2 root wheel 2 Oct 10 08:24 /var/db/ports 132 1 drwx------ 2 root wheel 2 Oct 10 08:24 /var/db/hyperv 131 1 drwxr-xr-x 3 root wheel 3 Oct 10 08:24 /var/db/zfsd 130 1 drwx------ 2 root wheel 2 Oct 10 08:24 /var/db/ipf 129 17 drwx------ 2 operator operator 10 Oct 10 08:24 /var/db/entropy 128 1 drwxr-xr-x 2 root wheel 3 Oct 3 18:59 /var/db/kea 34 17 drwxr-xr-x 22 root wheel 41 Oct 11 12:28 /var/db/ 34 17 drwxr-xr-x 2 root wheel 10 Oct 10 12:04 /var/db/pkg 28 49 drwxr-xr-x 2 root wheel 5 May 24 11:59 /var/db/fontconfig 19 1 drwxr-xr-x 2 root wheel 4 Jul 9 10:43 /var/db/aliastables 3 17 drwxr-xr-x 2 nobody wheel 23 Sep 3 13:32 /var/db/rrd
๏ธ
-
@RobbieTT This is my output in a txt-file because its to big...
What can I do with it, can I erase much of it? -
@RobinH said in Free Disk space >80%:
The packages I run is Acme, Haproxy, Openvpn-client-export, PfBlocker (disabled, not in use), system_patches, Telegraf and Status_traffic_totals
@RobinH said in Free Disk space >80%:
output in a txt-file
/var/db/ntopng ...
Did you have ntopng installed, and uninstalled it?
-
Your earlier output shows the total size of /var as 697MB. That's quite big but there is still ~11GB that seem to be unaccounted for.
-
@SteveITS ntopng is not installed, maybe it has been before.
-
@stephenw10 We have many OpenVPN tunnels, could that be it?
-
No VPNs don't really use any storage.
If ntop has been uninstalled then you can remove all those db entries for it in /var.
-
@stephenw10 Great, thats something :)
Is there a good way to remove the whole ntopng directory from /var/db/ ? -
You can do a recursive delete but it's...risky! Safer to remove the files inside that directory first.
-
@stephenw10 Okay, better not risk more than I have to. But everything inside /var/db/ntopng can be removed.
-
Yes.
-
I think ntopng has a GUI button to remove all the database entries, leaving you the uninstall and any remaining rm and rmdir after that.
I'm surprised how much space pfblockerNG took; mine is a mere fraction of that.
Still lots unaccounted for. The biggest user of space on mine is having version snapshots for different dev loads. The rest is trivial:
Good hunting.
๏ธ
-
@RobbieTT Yeah, I will uninstall the PfBlocker... not using it at all.
And will clear the ntopng files...
-
@RobbieTT said in Free Disk space >80%:
I'm surprised how much space pfblockerNG took
I presume this happens out there in the wild :
People install pfBlockerng, and start to try out all these : Firewall > pfBlockerNG > Feeds because "why not ?".
Soon, they'll discover that there is something as a resource limit, and not only disk space, but also that Xeon 8 core processor that goes hot read. An ARM won't make it at all ....All these 'feed' files initially downloaded, and their parsed and assembled counter parts will stay in the sub folders of this folder path /var/db/pfblockerng for until the end of days .... (or pfSense re install) or manual cleaning, as I don't think the /var/db/pfblockerng/. is emptied upon package removal. [ I have to try that one ... ]
Still, pfBlockerng is a small example. Processes (programs) that auto generate content are a real admin's nightmare - you have to watch them as you would do with babies. Even on big-iron-servers with loads of disk space (multiple T's) I do graph constantly free inodes and free disk blocks (disk space). Here is the same thing for my pfSense.File rotating for log files is the most straightforward example : as soon as my apache2 servers (or mail server) get swamped by requests, log files start to grow rapidly - like very fast. By simply launching multiple requests the server will steadily fill up its disk space, and then the classic game starts : what comes first : log rotation or server crash.