Installation swapfile question
-
I just built a new firewall based upon CE 2.7.2 in which, for redundancy, i installed it as a raidz-1. I wanted both drives to be mirrored incase one fails i can pop it out and install a new ssd (same ssd of course) and go about my business without having to redo anything. I don't know how many pfsense installs i've done... dozens, so yes, i'm pretty well versed, however most have been onto a single ssd.
here's my question:
at the screen where we choose which raid level and the sector size, swap file size, whether we want our swap file mirrored, before we commit the settings to disk..
I chose to have my swapfile 32 Gigs, and when i chose to "mirror my swap" it would error out with a gmirror erro message (or something like that.. couldn't write metadata, blah blah... i don't remember the message exactly).. but my point is, i wanted to mirror my swap.. both drives should be the same so incase (like i said above) one drive fails, the system keeps going until it's replaced.
choosing the 2nd to last option to mirror my swap causes it to error out.. not selecting to mirror my swap (default) allowed it to install without issue.
so, while the OS is installed on two drives as raidz-1, is the swap partition raid-0'd (striped) across the swap partitions?
i'm confused because if i chose to run a raidz-1 on the OS drives, doesn't that automatically mirror the swap as well?
thanks!
-
@jc1976 said in Installation swapfile question:
i'm confused because if i chose to run a raidz-1 on the OS drives, doesn't that automatically mirror the swap as well?
Hello, in former days a /swap partition will be able to create only with 4 GB (max.) size. I got a single mSATA running with
pfSense 2.7.2 with a 8 GB /swap partition. So if the RAM runs full, it will be using the /swap for paging out.In your case I would try out to go with a 4 GB and then trying to highing it up.
-
@Dobby_ said in Installation swapfile question:
Hello, in former days a /swap partition will be able to create only with 4 GB (max.) size. I got a single mSATA running with
pfSense 2.7.2 with a 8 GB /swap partition. So if the RAM runs full, it will be using the /swap for paging out.back in the good old days, the swap partition (file) was about the size of the RAM.
So, if you have 4 Gbytes (and remove 1 Gbytes as the kernel will block the upper part for its own usage) you create a 3 Gbytes swap and you'll be fine.That said, if pfSense starts to actually use the swap, consider your firewall severally crippled. The swap file exists merely to enable you to see when to add RAM, or stop using 'big processes'. You should act earlier then soon when this happens.
A 32 Gbytes swap on pfSense ? That's IMHO, pure BS ;). It doesn't harm, though. It's just 32 Gbytes wasted.
Btw : here is my pfSense memory usage.That said, if I would need a 32 Gbytes pfSense "because I can" or "because I have to" I would have taken the TNSR train already. After all, I just have a small, less then 50 devices network (3 LANs), one WAN, no gadgets, no bells and whistles system. I don't have any MITM needs etc.
I've a "4100" that doesn't allow any raid setup (does a Netgate appliance actually propose a raid ready device ?) as, when needed, I install pfSense "from USB drive" (3 minutes ?) and then I import my latest system config backup (1 minutes ?) and I'm up again.
I do use raid for my NASses, and file server devices etc.But again, I don't presume to know every 'firewall' need, I'm a small player, I know.
For essential devices like the main firewall I prefer the KIS setup - and I have a hot (not powered now, but in working state) spare device. -
Yes, if you're using SWAP in 'normal' use there's probably a problem. The biggest use for SWAP in pfSense is to be able to store crash reports should you ever hit a kernel panic. So I would argue that having it mirrored should not really be that important. Should.