New SG-4860 w/MSATA SSD, TRIM not enabled on factory install
-
Is there any way to do this from the GUI?
No.
-
Was able to get it enabled from the console following the instructions above. Thanks!
Will it stay enabled through further pfSense updates? Or do I have to manually re-enable it following each system update? -
Will it stay enabled through further pfSense updates?
I am still using the 64Bit version 2.2.6 and so I am not able to answer your question.
-
Will it stay enabled through further pfSense updates? Or do I have to manually re-enable it following each system update?
It will stay in place unless you reinstall the OS.
-
how would one enable trim? a command or?
-
how would one enable trim? a command or?
Please read the comment from @nicholfd above, if you are in single user mode you open a shell and
type in the following two commands./sbin/tunefs -t enable / /sbin/shutdown -r now
1rst enables TRIM
2nd reboot the pfSense box
done. -
I just wanted add a small note to this that you can check TRIM status through the dashboard at Diagnostics->Command Prompt. In the Execute Shell Command field enter:
tunefs -p /
Clicking Execute will print the output, just the same as with TTY.
-
It looks like our factory installer on 2.3 isn't setting trim like it should. We're looking into it.
Would this also explain why my 4860 also didn't have the AES-NI settings turned on by default?
-
How can I enable TRIM on a remote SG-2220 where a serial cable is not an option ?
Would be great if TRIM could be enabled via GUI or by software update/install …
I.e. During install/update -> If SSD present then Enable TRIM
-
How can I enable TRIM on a remote SG-2220 where a serial cable is not an option ?
Would be great if TRIM could be enabled via GUI or by software update/install …
I.e. During install/update -> If SSD present then Enable TRIM
You can't. The procedure requires running the command in single user mode to work properly, and you can't do that remotely (unless you have some sort of OOB console access that doesn't involve the firewall)
-
Thanks a lot for your help jimp. I have already enabled TRIM on my local 4860 but my SG-2220 is at my parents house at the other side of the globe.
I plan to be there in approx 2 years and I hope the built in 60GB SSD will last that long without TRIM enabled.The SG-2220 has been rock solid as IPSEC endpoint. Even remote Software Updates to 2.3.2 went without a problem. However, my hands are tied in regards to enabling TRIM and therefore I'd like to minimise writes to the SSD as much as possible. I use the SSD for SNORT etc, but do not require extensive logging or RRD.
I do use the RAM Disk for /tmp and /var and have tripled the default sizes.
What happens if the RAM Disk fills up ? Will the logs rotate automatically ?SSD only shows 2% usage of 50GB (reported)after 8 months of 24/7 operation.
Is there anything else I can do to minimise writes to SSD ? -
If you have /tmp and /var in RAM, writes to the actual disk should be minimal unless you have packages that keep data there.
The log files are a fixed size and do not need rotating, they are binary circular log files (clog). I wouldn't worry much, given the scenario you describe.
-
This is what I followed to enabled TRIM on mine: https://forum.pfsense.org/index.php?topic=97554.msg543373#msg543373 and it worked.
The only difference there is that the OP used:
/sbin/tunefs -t enable /dev/ufsid/55bdd213616a70a3
instead of
/sbin/tunefs -t enable /
Does that produce the same effect if you only have on SSD? Does "/" mean it will enable TRIM for all?
-
There has to be an easier way than the single user mode option.
If the initial pf install forces a TRIM set (even on SSDs showing TRIM on after install) without user intervention, that should resolve going through running commands in single user more. Not sure how the command would affect hard drives, it shouldn't but it most likely give a silent error during install.
I have been enabling TRIM using the link below.
https://gist.github.com/mdouchement/853fbd4185743689f58c
-
I came across that link too but you don't need to manually load ahci anymore as the latest installer already does that for you.