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

    MSata drive for APU2C4 board and Trim support

    Scheduled Pinned Locked Moved Hardware
    6 Posts 2 Posters 1.0k 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.
    • QinnQ
      Qinn
      last edited by Qinn

      Hi there I recently stumbled on these two:

      https://forum.netgate.com/topic/101673/new-sg-4860-w-msata-ssd-trim-not-enabled-on-factory-install/6

      https://forum.netgate.com/topic/70908/msata-drive-for-alix-apu-board-and-trim-support/4

      I saw that trim is not enabled, with:

      tunefs -p /
      

      output:

      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)
      

      I thought about enableling TRIM, but I am not sure if it is supported, is there anyway to be sure? I looked at the console at boot and saw:

      Trying to mount root from ufs:/dev/gptid/091891e1-98b3-11e8-9310-000db9426810 [rw]...
      Configuring crash dumps...
      Using /dev/gptid/091c6914-98b3-11e8-9310-000db9426810 for dump device.
      /dev/gptid/091891e1-98b3-11e8-9310-000db9426810: FILE SYSTEM CLEAN; SKIPPING CHECKS
      /dev/gptid/091891e1-98b3-11e8-9310-000db9426810: clean, 3010054 free (3358 frags, 375837 blocks, 0.1% fragmentation)
      Filesystems are clean, continuing...
      Mounting filesystems...
      

      is this needed or does a simple

      /sbin/tunefs -t enable /
      

      Suffice?

      Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
      Firmware: Latest-stable-pfSense CE (amd64)
      Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        I wouldn't expect it to be a problem. If you enable it and it isn't supported there will be a log line reporting that at boot.

        We don't enable it by default because some devices do react badly but they are not common AFAIK.

        Steve

        1 Reply Last reply Reply Quote 1
        • QinnQ
          Qinn
          last edited by

          @Stephenw10 thanks for your advise and yes I understand why you are not enabling it by default, just one thing before I try, from what I read there are a few ways described
          to set trim, all use the single user mode boot, but they use different approaches to enable trim:

          method 1

           /sbin/tunefs -t enable /dev/ufsid/55bdd213616a70a3
          

          https://forum.netgate.com/topic/87458/2-2-4-and-how-i-enabled-trim

          method 2

          "tunefs -t enable /" 
          

          Which one would you advise?

          Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
          Firmware: Latest-stable-pfSense CE (amd64)
          Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Hmm, if root is mounted then both should refer the same thing. Except you have to use /dev/gptid/091c6914-98b3-11e8-9310-000db9426810.

            It's been a while since I played around with this. I was never convinced it makes much difference to be honest.

            Try it and see. ๐Ÿ˜‰

            Steve

            QinnQ 1 Reply Last reply Reply Quote 1
            • QinnQ
              Qinn @stephenw10
              last edited by Qinn

              @stephenw10 reporting back, I don't really know what it brings, but TRIM is enabled, ๐Ÿ‘ Thanks! Or is there anyway to test it's use?

              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)                                 
              

              Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
              Firmware: Latest-stable-pfSense CE (amd64)
              Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Not that I'm aware of. If shows enabled there it should be doing it's thing.

                Steve

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