swap not listed? [solved]
-
@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'. -
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)
-
@gertjan
Thanks for the link to the applicable thread. I am in the exact same situation.
I will reply there with any updates. -
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)
-
@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.
-
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
-
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.
-
-
@jimp Is there a way to enable swap on the 2100?
-
@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 0So is the point at which I can edit fstab and change the ada2p3 to ada0p3? Then reboot pfsense?
-
Yes you could just edit he fstab if you have only one drive now and it has a SWAP partition.
-
@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.
-
Worked like a charm - now the swap partition shows up in the System Information widget.
-
@stephenw10
Thank you again sir. -
@JonathanLee said in swap not listed? [solved]:
@jimp Is there a way to enable swap on the 2100?
Other than what's already been mentioned, if you use the new net installer to (re)install 24.03 on a 2100 you can specify the amount of swap space it will define (or disable by setting it to 0). The net installer does not use the old method of writing out disk images, it works similar to the full installation experience on amd64, even on aarch64/arm64.
I would only recommend choosing to enable swap on a 2100 if you have an SSD in there, though.
-
@The-Party-of-Hell-No said in swap not listed? [solved]:
now the swap partition shows up in the System Information widget.
Now swap is working, you have to observe that is never - yeap, never, gets used.
Afaik, its useful to store crash dumps, so you an do some post mortem, after reboot, analyses.
If pfSense start to actively use the swap, let this be a sign to you to take of load of the system immediately.This, the "Swp" line, should stay at "zero" always.
-
Can I in theory utilize the mmc as the 2100 max has a ssd after the fact just format that mmc and configure it for use with 23.05? I only want it for this system panic with use of the compex pcie card, it crashes when it goes full tilt but I canโt get the info without the swap, I donโt want to reinstall I just a temp accessible swap for use with the current issue.
-
While you could do that with the MMC, I wouldn't. If you have a cheap sacrificial USB thumb drive you could do it to that without worrying about potential harm to the MMC. I don't have the commands handy but you'd format the drive with gpart, add a freebsd-swap partition, then reference that partition in
/etc/fstab
as the swap parition. Then when you're done, remove the fstab entry, reboot and remove the thumb drive. -
@jimp thanks that is the info I need
-
@Gertjan
For sure. I have 16 gb of memory and pfsense+ rarely pushes past 40% (Usually with a pfBlockerNG update or snort update there will be a rise in memory usage.) so I assume I will never need the swap. It made more sense to accept the default settings when installing than trying to resize or remove the swap file especially since I am using a 120 gb ssd. When you have that much space, who cares about waste.The point of the exercise was not to get the swap file to work, It was to get it to show up in the System Information widget in the GUI.
-
Whoohooo!!
My swap is bigger than my ram