Does PFSense support TRIM? Or hard drive only?
-
I have several SSDs I could use one of them. But I hear that there is a lot of caching that has to be done and a hard drive would be better. Is this true?
-
Yes <fstune>offers trim support.
Another option is the embedded install with NanoBSD which uses a read-only mode.
Just burn the image to your ssd. Will lose disk space but good for checking out pfSense.
pfSense really only uses a physical disk for loading. Once loaded most normal operations run in RAM.
So quicker disk, faster pfSense load times. So unless running packages -startup speed is the only advantage, except heat, noise and physical platters….
Most of us have systems up for weeks so who cares about load time. That is why CF is such a popular option. Slow but reliable.</fstune>
-
I followed this to align and enable trim on my SSD:
https://forum.pfsense.org/index.php?topic=86139.0
Step-by-step I did the following:
*** This erases everything from the disk***
1.) Boot into partedmagic and dd zeros or secure erase the target ssd
2.) Boot the pfSense liveCD in default mode
3.) Drop to shell instead of running the installer
4.) #gpart destroy -F ada0s1 (only needed if you did not secure erase first)
5.) #gpart destroy -F ada0 (only needed if you did not secure erase first)
6.) #gpart create -s mbr ada0
7.) #gpart add -t freebsd -b 504 ada0
8.) Leave the shell and start the install process
9.) Custom Install
10.) Skip Format Disk
11.) Skip Partition
12.) Install Boot Block
13.) Format Disk
14.) I had to manually change the "/" partition to a size smaller than the disk or I would get an error. I ended up making an 80GB partition and 16GB swap on my 120GB intel 320SSD.
15.) CTRL-C at reboot and enable trim
16.) #/sbin/tunefs -t enable /dev/ada0s1aReboot
Execute Shell command in the web interface to run
gpart showStart of slice plus start of partition should be divisible by 8.
For my disk it worked out to be:
(504+16)/8 = 65 Aligned
(504+167772160)/8 = 20971583 AlignedThis worked for me after a lot of trial and error. If you choose the wrong thing during install it will nuke the manual partition and you will end up not aligned and have to start the process all over.
Unless I am missing something this will get you aligned slices and trim enabled on your SSD.
![Untitled picture.png](/public/imported_attachments/1/Untitled picture.png)
![Untitled picture.png_thumb](/public/imported_attachments/1/Untitled picture.png_thumb)