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

    Anomalous disk usage in pfSense 2.5.1

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 791 Views 3 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.
    • R Offline
      roldor
      last edited by

      Hi, everyone

      I have found out an anomalous disk usage in my pfSense instance. Here you are console output:

      [2.5.1-RELEASE][root@morannon.ednonlabs.com]/: df -h
      Filesystem                     Size    Used   Avail Capacity  Mounted on
      /dev/ufsid/591e12427abe4feb     48G    1.5G     43G     3%    /
      devfs                          1.0K    1.0K      0B   100%    /dev
      /dev/md0                       3.4M    128K    3.0M     4%    /var/run
      devfs                          1.0K    1.0K      0B   100%    /var/dhcpd/dev
      

      As you can see total size (48G) does not correspond to the sum of available space (43G) and used space(1.5G).

      What could be the reason of this behaviour?

      Thanks in advance 😄

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG Online
        Gertjan @roldor
        last edited by

        @roldor said in Anomalous disk usage in pfSense 2.5.1:

        What could be the reason of this behaviour?

        What about :
        48G minus 1.5G = 46,5 G.
        Available is 43G. You miss 46.5 - 43 = 3.5G.
        1.5G is the space used by files - folders and files you can delete, etc.

        The missing 3.5G could be :
        Partition alignment.
        The two FAT - or the 'inode' table(s)
        The root directory.
        Other internal file structures, whatever FreeBSD for this type of file system.

        Btw :

        [2.5.2-RELEASE][root@pfsense.my-domain.net]/root: df -h
        Filesystem                     Size    Used   Avail Capacity  Mounted on
        /dev/ufsid/54ca20c41b3d50b0    285G    7.0G    255G     3%
        .....
        

        which means (285-255)-7= 23 Gb 'gone' :)
        But, I don't care. It's a router, not a NAS.

        You shouldn't test the ZFS file system, I've heard it far worse ;)

        Also : the same story is probably valid for fat32, NTFS, etc.

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

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          roldor @Gertjan
          last edited by

          Hi, @gertjan

          Thanks for your answer. Nervertheless, I would like to know the main reason of this behaviour.

          Regards

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG Online
            Gertjan @roldor
            last edited by

            @roldor

            Ok, you asked for it.

            Start reading here.

            Btw : as you might know, as disk type device is known as a "block device".
            When you store a file with one byte in it, or 200 bytes, at least 1 block will get allocated. This is often a sector, or a set of sectors on the physical device.
            So, at least, 512 are 'gone' even when you use 1 or 20 bytes.

            For each file, 256 bytes are lost.

            I advise you to locate a nice Youtube video that explains what a file system is, or UFS (used by pfSense == FreeBSD) or ZFS, if you use that.
            See https://docs.freebsd.org/en/books/handbook/filesystems/

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

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

              See: https://docs.freebsd.org/en/books/faq/#disk-more-than-full

              (43G+1.5G)x108% = ~48G

              Steve

              1 Reply Last reply Reply Quote 2
              • R Offline
                roldor
                last edited by

                Hi, @Gertjan and @stephenw10

                Thank you for your answers.

                Regards

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