Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Does PFSense support TRIM? Or hard drive only?

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    3 Posts 3 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lar
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by

        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>

        1 Reply Last reply Reply Quote 0
        • cwagzC
          cwagz
          last edited by

          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/ada0s1a

          Reboot

          Execute Shell command in the web interface to run
          gpart show

          Start 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 Aligned

          This 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)

          Netgate 6100 MAX

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.