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

    Free up space, disk storage >80%

    Scheduled Pinned Locked Moved General pfSense Questions
    48 Posts 5 Posters 10.2k Views 5 Watching
    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.
    • S Offline
      SteveITS Rebel Alliance @RobinH
      last edited by

      @RobinH said in Free Disk space >80%:

      Is it safe to uninstall PfBlocker

      Sure, it's safe, it's just a decision you make. Note when uninstalling there is a checkbox to keep settings/files or remove them:
      8aa8367f-357b-4d2e-a219-fbd4b96e687b-image.png

      Did you find this page?
      https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-usage.html

      One way to get pfSense to use all 60 GB would be to reinstall pfSense and restore your configuration from backup.

      Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
      When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
      Upvote ๐Ÿ‘ helpful posts!

      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        You can grow the filesystem to fill the available space. Since it's a VM you can just snapshot it first.

        To do it run touch /root/force_growfs then reboot.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          SteveITS Rebel Alliance @stephenw10
          last edited by

          @stephenw10 Well that's much easier. :) Though reinstalling would get OP to ZFS.

          Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
          Upvote ๐Ÿ‘ helpful posts!

          1 Reply Last reply Reply Quote 0
          • stephenw10S Offline
            stephenw10 Netgate Administrator
            last edited by

            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.

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              RobinH @stephenw10
              last edited by

              @stephenw10

              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? ๐Ÿ˜ฌ

              1 Reply Last reply Reply Quote 0
              • stephenw10S Offline
                stephenw10 Netgate Administrator
                last edited by

                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

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  RobinH @stephenw10
                  last edited by

                  @stephenw10

                  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
                  
                  GertjanG 1 Reply Last reply Reply Quote 0
                  • GertjanG Offline
                    Gertjan @RobinH
                    last edited by

                    @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 where ๐Ÿ˜Š

                    Anyway : 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 ^^)

                    b3adc819-3a26-4cb0-b4d8-a55a7916afb5-image.png

                    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.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    RobbieTTR 1 Reply Last reply Reply Quote 0
                    • RobbieTTR Offline
                      RobbieTT @Gertjan
                      last edited by RobbieTT

                      @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
                      

                      โ˜•๏ธ

                      R 1 Reply Last reply Reply Quote 1
                      • R Offline
                        RobinH @RobbieTT
                        last edited by

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

                        output.txt

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          SteveITS Rebel Alliance @RobinH
                          last edited by

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

                          Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                          When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
                          Upvote ๐Ÿ‘ helpful posts!

                          R 1 Reply Last reply Reply Quote 0
                          • stephenw10S Offline
                            stephenw10 Netgate Administrator
                            last edited by

                            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.

                            R 1 Reply Last reply Reply Quote 0
                            • R Offline
                              RobinH @SteveITS
                              last edited by

                              @SteveITS ntopng is not installed, maybe it has been before.

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                RobinH @stephenw10
                                last edited by

                                @stephenw10 We have many OpenVPN tunnels, could that be it?

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S Offline
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  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.

                                  R 1 Reply Last reply Reply Quote 0
                                  • R Offline
                                    RobinH @stephenw10
                                    last edited by

                                    @stephenw10 Great, thats something :)
                                    Is there a good way to remove the whole ntopng directory from /var/db/ ?

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S Offline
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      You can do a recursive delete but it's...risky! Safer to remove the files inside that directory first.

                                      R 2 Replies Last reply Reply Quote 0
                                      • R Offline
                                        RobinH @stephenw10
                                        last edited by

                                        @stephenw10 Okay, better not risk more than I have to. But everything inside /var/db/ntopng can be removed.

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S Offline
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Yes.

                                          RobbieTTR 1 Reply Last reply Reply Quote 0
                                          • RobbieTTR Offline
                                            RobbieTT @stephenw10
                                            last edited by

                                            @stephenw10

                                            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:

                                             2023-10-11 at 15.17.36.png

                                            Good hunting.

                                            โ˜•๏ธ

                                            R GertjanG 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.