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

    Virtual Disk capacity shows different from the disk capacity shown in WebGUI

    Scheduled Pinned Locked Moved Virtualization
    37 Posts 3 Posters 7.4k Views
    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.
    • K
      kejianshi
      last edited by

      Yeah - It will effect clients on the box, sure until its re-cached as supermule said.  But less so than having a pfsense thats crashing due to full disk.

      Also, lusca / squid has to index HHD cache in ram, so you can't just have an arbitrarily huge disk cache.

      Lets say you are OK with squid consuming half your RAM to ONLY index disk cache.  Figure you need 5% of disk cache size to index those files.
      I have observed that it seems close to 4% but I like to be safe.
      So, take 100 / 5 = 20 and then 20 *2GB (because you are OK with using 2GB just for indexing cache) = 40GB.
      If the files are mostly huge on disk, there will be fewer of them so less ram required to index it.

      Anyway - Yes.  You set the maximum cache size in services > proxy server > cache management

      at the top, 40GB is about 40960MB so put that number in the top.

      (What is that number now)?

      **  Warning…  I think when you change that number it will force you to remake squid cache so whatever is currently cached will be lost. **

      (No sooner than I type this someone will say they are running 2TB of cache on a system with 1GB of RAM.  Cool - but it will crash eventually)

      Anyway - You are not going to get off easy.  You are going to lose your current cache more than likely no matter what you do.  May as well just make it nice and stable all at once.

      1 Reply Last reply Reply Quote 0
      • O
        onlineph
        last edited by

        Now I'm learning…

        As a point of discussion here is my current Proxy server: Cache management configuration, please let me know if I am over doing it and I really appreciate corrections:

        Hard disk cache system: coss+aufs
        coss Hard disk cache size: 50
        Hard disk cache size: 900000
        Object size: 4
        Memory cache size: 8
        Max memory object size: 4
        Minimum object size: 0
        Maximum object size: 1024
        Level 1 subdirectories: 16
        Memory replacement policy: HEAP GDSF
        Cache replacement policy: Heap LFUDA
        Low-water-mark in %: 90
        High-water-mark in %: 95

        Please don't ask me about those values as honestly I don't know what they are what they are.
        Okay so where field can I put the  40960 value?

        And is there any configuration that I need to correct from my current config?

        You mentioned that if I will change the number it will force to remake the squid cache so whatever cached will be lost, would that mean there's no need for me to rm -r /var/squid/cache ?

        Thanks and advance.

        1 Reply Last reply Reply Quote 0
        • K
          kejianshi
          last edited by

          Well - The one you really need to make smaller is 900000 - Thats nearly a TB

          Unless you have 36GB of RAM in your box to spare?  I'd set it to 40960 or so.

          Thats after you reinstall, of course on a virtual disk that will hold it all.

          1 Reply Last reply Reply Quote 0
          • K
            kejianshi
            last edited by

            "You mentioned that if I will change the number it will force to remake the squid cache so whatever cached will be lost, would that mean there's no need for me to rm -r /var/squid/cache ?"

            No - I would still run those commands after you change the cache size, after you reinstall.

            1 Reply Last reply Reply Quote 0
            • O
              onlineph
              last edited by

              I put 900000 expecting that I am allocating a big space for the caching thing, which I supposed not good?

              Okay so I'll try to make it 800000, yeah? or lower?

              So, the other values are okay?

              I only have 4GB RAM  :D

              So, which field shall the  40960 value goes? or is my current config good enough?

              1 Reply Last reply Reply Quote 0
              • K
                kejianshi
                last edited by

                Put 40960 where you have 900000.

                Don't bother with a 800GB virtual disk for pfsense.  If you give it 100GB thats way more than enough.  Very save with 40960MB cache size.

                1 Reply Last reply Reply Quote 0
                • O
                  onlineph
                  last edited by

                  Okay, done.

                  40960 replace 900000 already. Rebooted via console, checked the WebGUI and I now have 93% on Disk Usage.  :'(

                  I think I forgot to "rm -r /var/squid/cache"

                  Let stop the lusca then execute that commands…

                  1 Reply Last reply Reply Quote 0
                  • K
                    kejianshi
                    last edited by

                    Good idea.

                    I'd do all of this:

                    cd /var/squid/cache
                    rm -rf *
                    squid -z

                    But this is just a band-aid.  You have to fix that disk size issue.  Reinstall is best most reliable way.

                    1 Reply Last reply Reply Quote 0
                    • O
                      onlineph
                      last edited by

                      Okay, Done!

                      I have now Disk Usage of 18%  ;D

                      When I tried cd /var/squid/cache  it didn't recognized the command it says something "not found"

                      I only employed:

                      rm -r /var/squid/cache
                      after it finish restart ninyo yung pfsense box
                      then type squid -z

                      I think there's something that I did wrong. After rm -r /var/squid/cache I didn't restarted the console instead I squid -z then I restarted. Is there an effect on it? Or shall I squid -z now?

                      1 Reply Last reply Reply Quote 0
                      • O
                        onlineph
                        last edited by

                        @kejianshi:

                        Good idea.

                        I'd do all of this:

                        cd /var/squid/cache
                        rm -rf *
                        squid -z

                        But this is just a band-aid.  You have to fix that disk size issue.  Reinstall is best most reliable way.

                        I am reluctant to re-install it is because I might lost my theme. I created my own personalized theme and I painfully uploaded each of the file via File Manager. If I reinstall the original ova file, I might lose my theme. Or do you happen to have a solution to quick upload a theme?

                        1 Reply Last reply Reply Quote 0
                        • K
                          kejianshi
                          last edited by

                          If the squid process is running (no red x) and your disk usage isn't causing a crash, I'd say hindi touche ang sumpain bagay.

                          You can attempt to resize the slice properly - Thats just going to have to happen.

                          If that fails, a reinstall is a must.  You could also reduce the cach size to less than 7GB?  I don't think you want to do that.

                          Plus, your theme isn't really important more than likely.  Do you really want to have a bunch of time invested into a theme that disappears every time you update?  Proper function is whats really important right?

                          1 Reply Last reply Reply Quote 0
                          • O
                            onlineph
                            last edited by

                            Yeah, you're right.  :-[

                            I just love my blue-ish theme. I wonder why pfsense guru wouldn't want to create a better File Manager or say Theme Upload Manager.
                            Okay, thanks a lot for the mean time, I know we have a band-aid on place and if I still find favor from you would also be patient enough to teach me how to "resize the slice" properly.

                            From the VB end, I am able to resize the Virtual Disk from 10GB to 100GB. My problem would be on how to tell pfsense that the Virtual Disk is not 100GB. So that's maybe where we could start.

                            I'm ready for the next lesson sir!

                            What data do you need for me to start telling pf to acknowledge the new 100GB Virtual Disk?
                            Also, I'm a little bit confused, in the VB it says also about actual size.

                            Virtual Disk: 100GB
                            Actual Size: 7.77GB

                            It confused me.

                            1 Reply Last reply Reply Quote 0
                            • K
                              kejianshi
                              last edited by

                              Its like this:

                              http://wtf.hijacked.us/wiki/index.php/Resizing_Partitions

                              Which is why I'm encouraging you to backup settings today, reinstall and restore config.

                              1 Reply Last reply Reply Quote 0
                              • O
                                onlineph
                                last edited by

                                Okay Diagnostics: Backup/restore
                                Back up: ALL

                                Now reading the link…let me see if I understood.

                                1 Reply Last reply Reply Quote 0
                                • K
                                  kejianshi
                                  last edited by

                                  Looks like you are on the right track.

                                  1 Reply Last reply Reply Quote 0
                                  • O
                                    onlineph
                                    last edited by

                                    Okay, while studying this, there are some issues also that I wish to resolve:

                                    1. Auth logs - how to tell pfsense to save the auth log-file to a specific storage ie, drive: D: - I can't fine any tutorials so I assume you might know some blogs about it?

                                    Still reading the wiki…

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      kejianshi
                                      last edited by

                                      I'm not sure about that one.  Hows the disk size fixing going?

                                      1 Reply Last reply Reply Quote 0
                                      • O
                                        onlineph
                                        last edited by

                                        I wasn't able to digest yet the wiki but am still into it. Meanwhile, I used Clone VDI tool to increase the virtual drive from 10GB to 100GB then I noticed there is a check box in there to increase partition size but there is no option to enter a definite size but it was expanded as a dynamic virtual disk which, it says here, it auto grows.

                                        Anyway, I'll update you what will gona happen since I have not yet attempted to attach the adjusted virtual disk to my virtual machine.

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          kejianshi
                                          last edited by

                                          Cool.  I know you really want to keep that theme.  ;)

                                          1 Reply Last reply Reply Quote 0
                                          • O
                                            onlineph
                                            last edited by

                                            Hi,

                                            I haven't much time to simulate the lesson on the wiki but I have printed for my keep. I have attached the expanded storage, then erased the previous saved cached files.

                                            This are my observation:

                                            In just the whole day it filled my storage up to 85%. This is the status 4 hrs ago. Now I checked and it became 83%, I don't know what it means. But it seems to me it auto grows as it fills the storage. I have allocated 100G as you advice and put a cache cap of 40G. So I'm still observing.

                                            Anyway, I have 2 another question as attached.

                                            Image 1 refers to the WAN traffic but I'm not really sure how to interpret it. Also with image 2, the LAN traffic. How to interpret those data?

                                            WAN.jpg
                                            WAN.jpg_thumb
                                            LAN.jpg
                                            LAN.jpg_thumb

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