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

New Feature: /tmp and /var RAM disks on Full installs; /tmp and /var resizing

Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
38 Posts 12 Posters 20.3k 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.
  • J
    jimp Rebel Alliance Developer Netgate
    last edited by Mar 12, 2013, 5:57 PM

    New snapshots are up and it should be working OK for full installs.

    I just found and fixed a bug that prevented the sizing from working on NanoBSD, so that will be OK on the next snapshot.
    https://github.com/pfsense/pfsense/commit/efc0e29abc068b41f52a2d5d6ac89cb6c4791662

    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

    Need help fast? Netgate Global Support!

    Do not Chat/PM for help!

    1 Reply Last reply Reply Quote 0
    • M
      MaxPF
      last edited by Mar 12, 2013, 8:06 PM

      Would it make sense to use to use this feature on a Alix box with 256MB of ram?

      1 Reply Last reply Reply Quote 0
      • M
        mdima
        last edited by Mar 12, 2013, 11:30 PM

        Nice! Does the content of the ramdisk gets committed to the hard disk during a regular reboot/update?

        Thanks,
            Michele

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Mar 12, 2013, 11:54 PM

          @MaxPF:

          Would it make sense to use to use this feature on a Alix box with 256MB of ram?

          Only if you need to slightly tweak the /tmp and /var slice sizes. There isn't much wiggle room on ALIX for that.

          @mdima:

          Nice! Does the content of the ramdisk gets committed to the hard disk during a regular reboot/update?

          It works identically to NanoBSD. The RRD data and DHCP lease data are backed up on shutdown/reboot and restored at bootup. The options for periodic backup of those items also works on here. Also like NanoBSD, the pbi/pkg info is held in /root rather than /var/db/pkg

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by Mar 13, 2013, 2:14 AM

            On Alix, on the console during boot, I get:

            Mounting filesystems...
            [: -gt: unexpected operator
            [: -gt: unexpected operator
            Setting up memory disks... done.[/code]
            I think that spits out of rc.embedded when use_mfs_tmp_size and use_mfs_var_size have not been set in the config.
            It still falls through the tests somehow and ends up with the default 40MB and 60MB memory disks.
            

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Mar 13, 2013, 12:13 PM

              @phil.davis:

              On Alix, on the console during boot, I get:

              Mounting filesystems...
              [: -gt: unexpected operator
              [: -gt: unexpected operator
              Setting up memory disks... done.[/code]
              I think that spits out of rc.embedded when use_mfs_tmp_size and use_mfs_var_size have not been set in the config.
              It still falls through the tests somehow and ends up with the default 40MB and 60MB memory disks.
              
              I think that's the bug I fixed with the commit I linked, make sure you've got that one (or try another snap after)
              
              The problem was the config slice wasn't mounted when it tried to read the config, so the file wasn't there. The command should always get a number back from grep -c so long as the file exists, but I could add some extra protections just in case.
              

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by Mar 13, 2013, 6:54 PM

                It needs a bit fancier checking for null values in rc.embedded - I just submitted a pull request. You might have a neater way of making it do the "-gt 0" check against a possibly empty variable.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • J
                  jimp Rebel Alliance Developer Netgate
                  last edited by Mar 13, 2013, 6:56 PM

                  Nah your check is fine, I merged it. Thanks!

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • A
                    athurdent
                    last edited by Mar 14, 2013, 1:08 PM

                    Great feature, thanks! Works fine so far.

                    1 Reply Last reply Reply Quote 0
                    • A
                      asterix
                      last edited by Apr 3, 2013, 3:14 PM

                      Installed the latest snapshot, turned on this feature. Left blank for default space. Installed Squid3 and after reboot it gives me the below error on the login page and I am locked out as I cannot log into the system. The pfSense is a remote box and I don't have physical access to it. Darn !

                      Warning: session_start(): open(/var/tmp//sess_a5f98c219d39beb8a18480d9a81a2024, O_RDWR) failed: No space left on device (28) in /etc/inc/auth.inc on line 1316

                      1 Reply Last reply Reply Quote 0
                      • J
                        jimp Rebel Alliance Developer Netgate
                        last edited by Apr 3, 2013, 3:16 PM

                        Well what did you expect when you gave it a pittance for space in /tmp and /var and tried to install a package that used it all up?

                        Unfortunately there is no way to prevent foot-shooting there, but I suppose I could add even more stern warnings to the page.

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • A
                          asterix
                          last edited by Apr 3, 2013, 3:18 PM

                          I realized about the setting just the second after I clicked reboot. Any backdoor method to gain access to the system?

                          1 Reply Last reply Reply Quote 0
                          • J
                            jimp Rebel Alliance Developer Netgate
                            last edited by Apr 3, 2013, 3:20 PM

                            Hard to say for sure, if you can get it to the console menu at all you might be able to go back to an older version of the config, assuming any are there. It very well could have wiped out quite a bit if /tmp and/or /var filled up.

                            If you can get to a prompt, check /conf/backup/ and see if there are any old configs there, if there are, then copy one to /conf/config.xml, rm /tmp/config.cache, and reboot

                            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                            Need help fast? Netgate Global Support!

                            Do not Chat/PM for help!

                            1 Reply Last reply Reply Quote 0
                            • A
                              asterix
                              last edited by Apr 3, 2013, 6:06 PM

                              Can't do much remotely. Only access I had to it was over WAN https.

                              1 Reply Last reply Reply Quote 0
                              • w0wW
                                w0w
                                last edited by Apr 4, 2013, 3:31 AM

                                Updated to the latest snapshot via automatic update. No option in System-Advanced-Mics.
                                What am I doing wrong?

                                1 Reply Last reply Reply Quote 0
                                • O
                                  Oliver_
                                  last edited by Apr 4, 2013, 8:16 AM

                                  is it possible to create a option for a third RamDisk?
                                  So we can choose Squid/HAVP/etc for using this space for caching!
                                  so the normal usage of  /tmp and /var is not affected?!

                                  1 Reply Last reply Reply Quote 0
                                  • P
                                    phil.davis
                                    last edited by Apr 4, 2013, 8:46 AM

                                    @w0w:

                                    Updated to the latest snapshot via automatic update. No option in System-Advanced-Mics.
                                    What am I doing wrong?

                                    Which option is not there?
                                    On nanobsd, the checkbox "Use memory file system for /tmp and /var" does not appear, because it is not optional - it always "Uses memory file system for /tmp and /var".

                                    As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                                    If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      jimp Rebel Alliance Developer Netgate
                                      last edited by Apr 4, 2013, 12:00 PM

                                      @Oliver_:

                                      is it possible to create a option for a third RamDisk?
                                      So we can choose Squid/HAVP/etc for using this space for caching!
                                      so the normal usage of  /tmp and /var is not affected?!

                                      No, there is no option for that, and probably won't be. Not something common enough to warrant doing. Just config squid to use more memory cache and not a disk cache in a RAM disk. That's a discussion for a different thread though.

                                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                      Need help fast? Netgate Global Support!

                                      Do not Chat/PM for help!

                                      1 Reply Last reply Reply Quote 0
                                      • w0wW
                                        w0w
                                        last edited by Apr 4, 2013, 3:55 PM Apr 4, 2013, 3:44 PM

                                        @phil.davis:

                                        @w0w:

                                        Updated to the latest snapshot via automatic update. No option in System-Advanced-Mics.
                                        What am I doing wrong?

                                        Which option is not there?
                                        On nanobsd, the checkbox "Use memory file system for /tmp and /var" does not appear, because it is not optional - it always "Uses memory file system for /tmp and /var".

                                        I have full install done on ssd disk about a half of year ago
                                        Now it shows
                                        2.1-BETA1 (i386)
                                        built on Wed Apr 3 04:19:20 EDT 2013
                                        FreeBSD 8.3-RELEASE-p7

                                        This what I have in System: Advanced: Miscellaneous  (see attached image)

                                        mics.gif
                                        mics.gif_thumb

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          jimp Rebel Alliance Developer Netgate
                                          last edited by Apr 4, 2013, 4:35 PM

                                          You must have some other issue preventing that page from getting updated, but it's not relevant to this thread. Start a fresh thread and someone can help you investigate why a firmware update isn't updating that file.

                                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                          Need help fast? Netgate Global Support!

                                          Do not Chat/PM for help!

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]