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

    New SG-4860 w/MSATA SSD, TRIM not enabled on factory install

    Scheduled Pinned Locked Moved Hardware
    23 Posts 10 Posters 6.3k 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.
    • N
      nicholfd
      last edited by

      I just received a set of rack mount SG-4860s with 120GB MSATA SSDs pre-installed.  I checked and TRIM was not enabled on either system.  I generally think TRIM is a good idea.

      Anyone know of any reason why TRIM should be left disabled on these systems?  If I don't get feedback from the pfSense people on this post, I'll open a ticket and post any info they can share, because I think it might be useful to others.

      Thanks,
      Frank

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

        It looks like our factory installer on 2.3 isn't setting trim like it should. We're looking into it.

        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
        • P
          pfsensory
          last edited by

          I have the same unit.  How does one check whether TRIM is enabled?

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

            tunefs -p /
            

            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
            • P
              pfsensory
              last edited by

              Looks like TRIM is disabled on mine too.

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

              1 Reply Last reply Reply Quote 0
              • N
                nicholfd
                last edited by

                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)                                 
                
                

                ![pfSense Boot Screen.png](/public/imported_attachments/1/pfSense Boot Screen.png)
                ![pfSense Boot Screen.png_thumb](/public/imported_attachments/1/pfSense Boot Screen.png_thumb)

                1 Reply Last reply Reply Quote 1
                • P
                  pfsensory
                  last edited by

                  Is there any way to do this from the GUI?

                  1 Reply Last reply Reply Quote 0
                  • N
                    nicholfd
                    last edited by

                    @pfsensory:

                    Is there any way to do this from the GUI?

                    Nope - sorry.

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

                      Is there any way to do this from the GUI?

                      No.

                      1 Reply Last reply Reply Quote 0
                      • P
                        pfsensory
                        last edited by

                        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?

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

                          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.

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

                            @pfsensory:

                            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.

                            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
                            • M
                              messerchmidt
                              last edited by

                              how would one enable trim? a command or?

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

                                @messerchmidt:

                                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.

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

                                  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.

                                  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
                                  • A
                                    allan
                                    last edited by

                                    @jimp:

                                    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?

                                    1 Reply Last reply Reply Quote 0
                                    • G
                                      gcu_greyarea
                                      last edited by

                                      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

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

                                        @gcu_greyarea:

                                        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)

                                        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
                                        • G
                                          gcu_greyarea
                                          last edited by

                                          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 ?

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

                                            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.

                                            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.