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

swap not listed? [solved]

General pfSense Questions
solved
9
41
5.7k
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 11, 2023, 10:46 PM

    Not sure there is any easy way to break that mirror. Reinstalling is so quick/easy that's probably the most reliable way to do it.

    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
      mvikman
      last edited by Mar 11, 2023, 11:13 PM

      Tested with a virtual machine, "/dev/mirror/swap" was created by the 2.6CE installer when selecting "Mirror swap" option
      Is it using GEOM Mirror for the swap and ZFS Mirror for the rest of the data?

      pfSense Plus 24.11-RELEASE (amd64)
      Dell Optiplex 7040 SFF
      Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
      HPE 561T (X540-AT2), 2-port 10Gb RJ45
      HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

      J 1 Reply Last reply Mar 11, 2023, 11:19 PM Reply Quote 0
      • J
        jimp Rebel Alliance Developer Netgate @mvikman
        last edited by Mar 11, 2023, 11:19 PM

        @mvikman said in swap not listed?:

        Tested with a virtual machine, "/dev/mirror/swap" was created by the 2.6CE installer when selecting "Mirror swap" option
        Is it using GEOM Mirror for the swap and ZFS Mirror for the rest of the data?

        It must be, since it's showing in /dev/mirror. That's all a part of the BSD installer and not our code though IIRC.

        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
          mvikman
          last edited by Mar 12, 2023, 12:31 AM

          What makes mirroring swap a bad idea, other than possible writes to swap are doubled/slower?
          Does it really matter if swap is not used at all in normal situations (system has enough RAM not to swap)?

          pfSense Plus 24.11-RELEASE (amd64)
          Dell Optiplex 7040 SFF
          Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
          HPE 561T (X540-AT2), 2-port 10Gb RJ45
          HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

          J 1 Reply Last reply Mar 12, 2023, 1:30 AM Reply Quote 0
          • J
            jimp Rebel Alliance Developer Netgate @mvikman
            last edited by Mar 12, 2023, 1:30 AM

            @mvikman said in swap not listed?:

            What makes mirroring swap a bad idea, other than possible writes to swap are doubled/slower?
            Does it really matter if swap is not used at all in normal situations (system has enough RAM not to swap)?

            Those two reasons are more than enough to not do it. Swap is already slow enough compared to RAM, making it even slower is going to be a problem if/when the system needs to hit swap.

            If your system never hits swap it's not going to matter much (until it does...) but there is no advantage to it either.

            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!

            J J 2 Replies Last reply Mar 12, 2023, 3:30 AM Reply Quote 0
            • J
              JonathanLee @jimp
              last edited by Mar 12, 2023, 3:30 AM

              @jimp In the case of Squid Proxy and content acceleration I have a 15 gb swap set up it's almost 70 percent full. Is this not the same thing, as it is considered a swap under the proxy ?

              Make sure to upvote

              J 1 Reply Last reply Mar 13, 2023, 12:51 PM Reply Quote 0
              • J
                johnpoz LAYER 8 Global Moderator @jimp
                last edited by johnpoz Mar 13, 2023, 12:57 PM Mar 13, 2023, 10:45 AM

                Well manually edit of fstab to be da0 vs da1, finally got around to a reboot of pfsense and now see swap

                login-to-view

                I don't really like rebooting my firewall.. Waited for a time when nobody streaming off plex, and wasn't doing anything else, etc.

                I will mark as solved, thanks Jim!

                edit: just to be complete, swapinfo now shows

                [23.01-RELEASE][admin@sg4860.local.lan]/root: swapinfo
                Device          1K-blocks     Used    Avail Capacity
                /dev/da0p2        1048576        0  1048576     0%
                [23.01-RELEASE][admin@sg4860.local.lan]/root: 
                

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                T 1 Reply Last reply May 6, 2024, 12:47 AM Reply Quote 2
                • J
                  jimp Rebel Alliance Developer Netgate @JonathanLee
                  last edited by Mar 13, 2023, 12:51 PM

                  @jonathanlee said in swap not listed? [solved]:

                  @jimp In the case of Squid Proxy and content acceleration I have a 15 gb swap set up it's almost 70 percent full. Is this not the same thing, as it is considered a swap under the proxy ?

                  That is unrelated. That is about squid's internal memory vs disk cache. This is about OS RAM usage.

                  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!

                  J 1 Reply Last reply Mar 16, 2023, 12:41 AM Reply Quote 1
                  • A
                    azdeltawye @johnpoz
                    last edited by azdeltawye Mar 13, 2023, 10:53 PM Mar 13, 2023, 10:40 PM

                    @johnpoz
                    I'm having the same issue on my brand new 4100; swap partition exists but is not showing in the widget.

                    I typed in the command: cat /etc/fstab but not sure where to go from here.

                    login-to-view

                    gpart show
                    login-to-view

                    I'm not sure why it says freebsd-ufs when the disk widget shows zfs...
                    login-to-view

                    G 1 Reply Last reply Mar 14, 2023, 6:59 AM Reply Quote 0
                    • G
                      Gertjan @azdeltawye
                      last edited by Gertjan Mar 14, 2023, 7:07 AM Mar 14, 2023, 6:59 AM

                      @azdeltawye said in swap not listed? [solved]:

                      I'm having the same issue on my brand new 4100; swap partition exists but is not showing in the widget

                      See Netgate 4100 disk : my 4100 MAX came with 22.01 pre installed and had a swap partition, but not shown in the GUI dashboard widget.
                      Had to edit the /etc/fstab/ as mentioned above.

                      This is mine right now :

                      [23.01-RELEASE][admin@pfSense.brit-hotel-fumel.net]/root: cat /etc/fstab
                      # Device                Mountpoint      FStype  Options         Dump    Pass#
                      /dev/nvd0p3             none    swap    sw              0       0
                      

                      NOte ; back then, see other thread, I had a first line :

                      /dev/msdosfs/EFISYS     /boot/efi       msdosfs rw,noatime,noauto       0       0
                      

                      Now, it is 't there anymore.

                      @azdeltawye said in swap not listed? [solved]:

                      freebsd-ufs when the disk widget shows zfs

                      Can't tell ...
                      I did do a complete re install with an fresh "22.05" image from Netgate, last September just to complete my 'crash test formation'.

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

                      A 1 Reply Last reply Mar 14, 2023, 6:39 PM Reply Quote 0
                      • J
                        jimp Rebel Alliance Developer Netgate
                        last edited by Mar 14, 2023, 12:27 PM

                        The 4100 MAX I have here appears to be OK, it was freshly installed recently with 23.01, though. It's possible there was an issue in the older installer.

                        I'm curious though if anyone can reproduce that with a fresh 23.01 install.

                        : cat /etc/fstab
                        # Device                Mountpoint      FStype  Options         Dump    Pass#
                        /dev/gpt/efiboot0               /boot/efi       msdosfs rw              2       2
                        /dev/nvd0p3             none    swap    sw              0       0
                        
                        : swapinfo
                        Device          1K-blocks     Used    Avail Capacity
                        /dev/nvd0p3       1048576        0  1048576     0%
                        
                        : gpart show -p
                        =>       40  234441568    nvd0  GPT  (112G)
                                 40     532480  nvd0p1  efi  (260M)
                             532520       1024  nvd0p2  freebsd-boot  (512K)
                             533544        984          - free -  (492K)
                             534528    2097152  nvd0p3  freebsd-swap  (1.0G)
                            2631680  231809024  nvd0p4  freebsd-zfs  (111G)
                          234440704        904          - free -  (452K)
                        

                        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
                          azdeltawye @Gertjan
                          last edited by Mar 14, 2023, 6:39 PM

                          @gertjan
                          Thanks for the link to the applicable thread. I am in the exact same situation.
                          I will reply there with any updates.

                          1 Reply Last reply Reply Quote 0
                          • A
                            azdeltawye
                            last edited by Mar 16, 2023, 12:11 AM

                            OK, problem solved.

                            I did a fresh install of 23.01 on my 4100-MAX and now the SWAP partition is recognized!

                            Before:

                            Shell Output - cat /etc/fstab
                            
                            # Device                Mountpoint      FStype  Options         Dump    Pass#
                            /dev/msdosfs/EFISYS     /boot/efi       msdosfs rw,noatime,noauto       0       0
                            /dev/gptid/1fa4f543-c6a2-11ec-93d9-90ec772a1255		none	swap	sw		0	0
                            
                            Shell Output - gpart show -p
                            
                            =>        3  234441637    nvd0  GPT  (112G)
                                      3     409600  nvd0p1  efi  (200M)
                                 409603  222504511  nvd0p2  freebsd-ufs  (106G)
                              222914114   11527521  nvd0p3  freebsd-swap  (5.5G)
                              234441635          5          - free -  (2.5K)
                            

                            After:

                            Shell Output - cat /etc/fstab
                            
                            # Device		Mountpoint	FStype	Options		Dump	Pass#
                            /dev/gpt/efiboot0	/boot/efi	msdosfs	rw		2	2
                            /dev/nvd0p3		none		swap	sw		0	0
                            
                            Shell Output - gpart show -p
                            
                            =>       40  234441568    nvd0  GPT  (112G)
                                     40     532480  nvd0p1  efi  (260M)
                                 532520       1024  nvd0p2  freebsd-boot  (512K)
                                 533544        984          - free -  (492K)
                                 534528   16777216  nvd0p3  freebsd-swap  (8.0G)
                               17311744  217128960  nvd0p4  freebsd-zfs  (104G)
                              234440704        904          - free -  (452K)
                            

                            login-to-view

                            1 Reply Last reply Reply Quote 1
                            • J
                              JonathanLee @jimp
                              last edited by Mar 16, 2023, 12:41 AM

                              @jimp does the 2100-Max have an ability to have a swap partition on the 30GB SSD drive? This is after a fresh install of 23.01 from TAC support provided software.

                              login-to-view

                              login-to-view

                              login-to-view

                              Make sure to upvote

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Mar 16, 2023, 12:51 AM

                                Not by default. And it would be complex to add it.

                                The aarch64 installs are created by imaging the target device directly, there is no installer like there is for amd64. The images used there do not have swap.

                                Steve

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

                                  Since you are running from an SSD you could partition the MMC and drop a swap slice on there if you really want swap but I wouldn't recommend doing that long term unless you're just wanting it for crash dumps.

                                  We're considering making it an option to disable swap memory usage while keeping swap for crash dumps but we don't have an option in for that yet.

                                  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!

                                  J 1 Reply Last reply May 5, 2024, 2:55 PM Reply Quote 2
                                  • G Gertjan referenced this topic on May 9, 2023, 11:25 AM
                                  • J
                                    JonathanLee @jimp
                                    last edited by JonathanLee May 6, 2024, 12:55 AM May 5, 2024, 2:55 PM

                                    @jimp Is there a way to enable swap on the 2100?

                                    Make sure to upvote

                                    J 1 Reply Last reply May 6, 2024, 1:08 PM Reply Quote 0
                                    • T
                                      The Party of Hell No @johnpoz
                                      last edited by May 6, 2024, 12:47 AM

                                      @johnpoz When I ran the gpart show -p:

                                      => 40 234441568 ada0 GPT (112G)
                                      40 409600 ada0p1 efi (200M)
                                      409640 1024 ada0p2 freebsd-boot (512K)
                                      410664 984 - free - (492K)
                                      411648 2097152 ada0p3 freebsd-swap (1.0G)
                                      2508800 231931904 ada0p4 freebsd-zfs (111G)
                                      234440704 904 - free - (452K)my
                                      Swap file is ada0s3,

                                      I went to cat/etc/fstab:
                                      /dev/ada2p3 none swap sw 0 0

                                      So is the point at which I can edit fstab and change the ada2p3 to ada0p3? Then reboot pfsense?

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        stephenw10 Netgate Administrator
                                        last edited by May 6, 2024, 1:34 AM

                                        Yes you could just edit he fstab if you have only one drive now and it has a SWAP partition.

                                        T 2 Replies Last reply May 6, 2024, 12:45 PM Reply Quote 1
                                        • T
                                          The Party of Hell No @stephenw10
                                          last edited by May 6, 2024, 12:45 PM

                                          @stephenw10 yes that is the case. I have migrated through several computers and I am thinking the incorrect location for the swap file is a remnant of past configurations - dual boot with windows and separate storage drives pre-zfs to store partition images using third party imaging program. When I clean installed 23 pfsense+? and moved to zfs, I pulled in my confiig file off a USB drive on reboot.

                                          T 1 Reply Last reply May 6, 2024, 12:52 PM Reply Quote 0
                                          21 out of 41
                                          • First post
                                            21/41
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.