SG2100 128GB SSD and Swap
-
-
-
-
So gpart shows it has a 6GB swap however the fstab file does not list it and swapinfo shows incorrect info?
-
@JonathanLee I should be able to just add a mount point for it right?
-
Yes you should just be able to add it to the fstab. Like:
[24.03-RELEASE][admin@5100.stevew.lan]/root: cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/ada0p2 none swap sw 0 0
Though you need to use /dev/ada0s3b.
-
@stephenw10 thanks after setting this the crash reports should show correct? This is new to me so the swap is essentially extra memory for the kernel? How does this help with getting crash reports? I am excited to test this with the compex card. Do I need to disable this or can I leave it enabled after we are done with it.
-
Yes it should store crash reports. The SWAP space still exists and is accessible from the debugger so it is able to store the crash report there. pfSense checks for any reports in the swap at boot and shows an alert if it finds any.
-
@stephenw10 is it safe to leave it on? It is on the SSD. I am a bit confused with this as why @jimp recommend using a usb for swap. Is that because that is recommended over using MMC but I have a SSD and that is ok to use? Is it essentially extra memory for only crash reports? Or let’s say I use clamAV and enabled the monster signature file would it overflow into the swap for loading? Kind of like Disk based RAM? It shouldn’t use it all the time right? Again with an SSD that can withstand abuse is it ok? 6GB swap, I only have 4GB memory and I can only access around 3.5 of it.
-
-
Yeah it's safe to leave enabled on an SSD. But, as you say, it should never get used anyway.
We have recommended using a USB drive for SWAP because it's easy to add. In your case it was trivial because the SWAP partition already existed. But on a system with emmc only where there is no SWAP then re-partitioning it to add swap is complex. Easier to reinstall. Or just use a USB drive temporarily.
-
@stephenw10
Okay Stephen riddle me this... yesterday I was able to get the swap file to show in the gui under system information by editing the fstab to correct the location of the swap file partition. Today I see my amount of swap is 1024 and "gpart show" says I have 1.06 or "freebsd-swap (1.0G)." What kind of trickery is this! -
This post is deleted! -
Unclear what your question is? You appear to have a 1GB SWAP partition and it's configured correctly if it appears in the gui.
-
@stephenw10
Sorry, I was not clear... the gui, system Information says the swap file is 1024mb but the swap file according to gpart is 1.0g. My thinking is these two should match? Am I wrong about that? -
Your in luck that is 1GB
64MB X 2 = 128MB a fourth of a 1GB
128MB X 2 = 512MB or half a 1GB
512 X 2 = 1024MB or Also known as 1GB :)
-
@JonathanLee said in SG2100 128GB SSD and Swap:
Your in luck that is 1GB
64MB X 2 = 128MB a fourth of a 1GB
128MB X 2 = 512MB or half a 1GB
512 X 2 = 1024MB or Also known as 1GB :)
Ahh shit, I sound like a bumpkin... never mind.
Hey could someone upvote me so I am not stopped from submitting posts because I have to wait 140 seconds as a new user. -
Your rep is over 5 now you should be good.
-
-
@stephenw10 Thank you.
-
Quick Question @stephenw10 @jimp
I am testing SWAP on a USB drive and I used gpart to create a swap partition on the drive, I have it referenced and it is working...
But it doesn't show usage here...
But it does here
This all seemed to math up with the SSD use
Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 250069679 first: 1 entries: 4 scheme: MBR Providers: 1. Name: ada0s1 Mediasize: 272629760 (260M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 512 Mode: r0w0e0 efimedia: HD(1,MBR,00000000,0x1,0x82000) rawtype: 239 length: 272629760 offset: 512 type: efi index: 1 end: 532480 start: 1 2. Name: ada0s2 Mediasize: 67108864 (64M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 272630272 Mode: r0w0e0 efimedia: HD(2,MBR,00000000,0x82001,0x20000) rawtype: 11 length: 67108864 offset: 272630272 type: fat32 index: 2 end: 663552 start: 532481 3. Name: ada0s3 Mediasize: 127695937024 (119G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 339739136 Mode: r1w1e2 efimedia: HD(3,MBR,00000000,0xa2001,0xedda2af) attrib: active rawtype: 165 length: 127695937024 offset: 339739136 type: freebsd index: 3 end: 250069679 start: 663553 Consumers: 1. Name: ada0 Mediasize: 128035676160 (119G) Sectorsize: 512 Mode: r1w1e3 Geom name: ada0s3 modified: false state: OK fwheads: 16 fwsectors: 63 last: 249406126 first: 0 entries: 8 scheme: BSD Providers: 1. Name: ada0s3a Mediasize: 120590425600 (112G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 339747328 Mode: r1w1e1 rawtype: 27 length: 120590425600 offset: 8192 type: freebsd-zfs index: 1 end: 235528190 start: 16 2. Name: ada0s3b Mediasize: 7105150976 (6.6G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 120930172928 Mode: r0w0e0 rawtype: 1 length: 7105150976 offset: 120590433792 type: freebsd-swap index: 2 end: 249405438 start: 235528191 Consumers: 1. Name: ada0s3 Mediasize: 127695937024 (119G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 339739136 Mode: r1w1e2
Just to confirm this is correct right I can hear the drive running seeking etc
I checked the ada0 made sure it would work unplugged it to make use it was the right drive name also