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

    Request to add to documentation wiki how to check and enable TRIM support

    Documentation
    4
    6
    3.9k
    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.
    • O
      openletter
      last edited by

      I was trying to figure out how to determine if TRIM is enabled and then how to enable it, and a lot of searching finally yielded this forum post:

      @nicholfd:

      Connect the console cable.

      At power on, make sure you are watching the boot.  Eventually you will get an option to boot to single user mode (screen shot attached).  Select option 2 and press enter.

      Eventually you will be asked to select a shell or press enter (IIRC).  Press enter and you will be at a command prompt.  Enter the following:

      /sbin/tunefs -t enable /
      /sbin/shutdown -r now
      

      After the reboot login and confirm TRIM is enabled:

      [2.3.1-RELEASE][admin@burns.springfield.com]/root: tunefs -p /
      tunefs: POSIX.1e ACLs: (-a)                                disabled
      tunefs: NFSv4 ACLs: (-N)                                   disabled
      tunefs: MAC multilabel: (-l)                               disabled
      tunefs: soft updates: (-n)                                 enabled
      tunefs: soft update journaling: (-j)                       enabled
      tunefs: gjournal: (-J)                                     disabled
      tunefs: trim: (-t)                                         enabled
      tunefs: maximum blocks per file in a cylinder group: (-e)  4096
      tunefs: average file size: (-f)                            16384
      tunefs: average number of files in a directory: (-s)       64
      tunefs: minimum percentage of free space: (-m)             8%
      tunefs: space to hold for metadata blocks: (-k)            6408
      tunefs: optimization preference: (-o)                      time
      tunefs: volume label: (-L)                                 
      
      

      It would be nice if this procedure were listed in the wiki some place.

      Note that checking the status of TRIM can be run from GUI command line by executing:

      tunefs -p /
      

      pfSense 2.4.3-RELEASE (amd64) installed to PC on Samsung 860 EVO mSATA 256 GB SSD with Supermicro X11SBA-LN4F, Intel Pentium N3700, 4 GB RAM, 4 mobo 10/100/1000, 1 PCIe 10/100/1000 x4 NIC (HP NC364T), and APC Smart-UPS SMT1500.

      1 Reply Last reply Reply Quote 0
      • F
        Finger79
        last edited by

        Bumping to second the OP's request.

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          "It would be nice if this procedure were listed in the wiki some place."

          Well request a wiki account and add it then ;)

          https://www.pfsense.org/get-involved/
          We can always use help with creating documentation and correcting existing material. If you would like to assist, please email wikiadmin@pfsense.org for an account on our documentation wiki.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            There are far too many variables, hardware support and so on, for an article to be viable. We've seen some disks violently disagree with TRIM so we won't advocate enabling it officially unless it's hardware we have 100% confirmed it will work for.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • O
              openletter
              last edited by

              Does that include SSDs where the manufacturer states the drive supports TRIM? SanDisk, for example, states that all of their SSDs support TRIM. I picked up what was pretty much their cheapest drive when I bought it and haven't had even one issue with TRIM being enabled.

              An article stating how to do enable it and includes problems associated with enabling plus a list of verified drives would be yet more valuable than even what I requested above.

              pfSense 2.4.3-RELEASE (amd64) installed to PC on Samsung 860 EVO mSATA 256 GB SSD with Supermicro X11SBA-LN4F, Intel Pentium N3700, 4 GB RAM, 4 mobo 10/100/1000, 1 PCIe 10/100/1000 x4 NIC (HP NC364T), and APC Smart-UPS SMT1500.

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                There was one SSD which shall remain nameless, when TRIM was enabled it suffered complete filesystem failures 100% every time.

                We aren't going to keep track of other vendor's hardware with any risk like that. If someone wants to track down the info, fine, but the moment we put something like that up and someone loses data it'll be on us. If someone wants to put together some info in a post, perhaps a sticky would be OK, but not on the wiki.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

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