Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    How to check if TRIM is on

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 214 Views 3 Watching
    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.
    • S Offline
      shoulders
      last edited by

      Hi

      I run pfSense on a Virtual Machine and I want to see if TRIM is running. I believe it is on for ZFS by default but I am runing the community version so I dont think it is in ZFS.

      • What commands can I run in the shell to see the TRIM status?
      • Is the TRIM status viewable in the GUI?

      So even if the default is that TRIM is on, I would like to check.

      thanks

      luckman212L 1 Reply Last reply Reply Quote 0
      • luckman212L Offline
        luckman212 LAYER 8 @shoulders
        last edited by

        @shoulders CE supports ZFS.

        Not sure if it's different when pfSense is running in a VM (I would think TRIM should be managed outside of the VM, not from inside…) but on my physical system, this command shows the trim status for the default zpool

        # zpool get all pfSense | grep trim
        pfSense  autotrim                          on                             local
        

        I just tested the same command in my CE VM and it returns the same

        a8c02ad7-a469-4d94-a17e-5ecc0d3c4055-image.png

        41a1b08d-5cec-4766-b0f2-429000bb883b-image.png

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          shoulders @luckman212
          last edited by

          @luckman212 thanks, So that command worked, and yes mine is on ZFS. I thought only the paid version was on ZFS, but I am now updated.

          So the autotrim is on for my ZFS, how can I check the underlying drive TRIM is supported? This is so I know the UNMAP/Discard commands are pushed upstream to the VMs host.

          luckman212L SteveITSS 2 Replies Last reply Reply Quote 0
          • luckman212L Offline
            luckman212 LAYER 8 @shoulders
            last edited by luckman212

            Been trying to research this a bit more.

            rather than pipe to grep, this command is a more specific check for TRIM enablement on zfs

            # zpool get autotrim
            NAME     PROPERTY  VALUE     SOURCE
            pfSense  autotrim  on        local
            

            As for whether the hardware itself supports it, it depends on whether the device is NVMe or SATA, for SATA it would be

            # smartctl -a /dev/ada0 | grep -i trim
            TRIM Command:     Available, deterministic, zeroed
            

            NVMe uses different parameters, apparently if DS_Mngmt appears in Optional NVM Commands it indicates that the device does support TRIM

            # smartctl -x /dev/nvme0 | grep DS_Mngmt
            Optional NVM Commands (0x00df):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp Verify
                                                            ^^^^^^^^
            
            1 Reply Last reply Reply Quote 0
            • SteveITSS Offline
              SteveITS Galactic Empire @shoulders
              last edited by

              @shoulders said in How to check if TRIM is on:

              I thought only the paid version was on ZFS

              Plus exposes boot environments in the GUI and uses that for upgrades, though they technically exist via command line in CE I believe. ZFS has been the default for both, for several years.

              It is possible to install pfSense and not use ZFS (maybe, one doesn't want the write amplification). However recall looking at that once and finding out TRIM was not that easy to set up in pfSense/FreeBSD for ufs, and that router ended up using ZFS.

              The dashboard Disks widget will show the file system in use.

              To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
              Only install packages for your version of pfSense.
              Upvote šŸ‘ helpful posts!

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
              Privacy Policy · Cookie Policy