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

Ahci(4) needed for TRIM

2.1 Snapshot Feedback and Problems - RETIRED
12
42
28.5k
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.
  • A
    AhnHEL
    last edited by Jul 29, 2013, 2:52 AM Jul 29, 2013, 2:31 AM

    Does that printout look normal with the unexpected operator?  End result seems to be correct.

    
    [2.1-RC0][root@pfsense@pfsenseuser.net]/root(17): chmod a+x /usr/local/sbin/ufslabels.sh ; /usr/local/sbin/ufslabels.sh
    FS: / on device ada0s1a with ufsid 51f5bc9c854a3254
    FS: Swap on device ada0s1b
    ====================
    Current fstab:
    # Device                Mountpoint      FStype  Options         Dump    Pass#
    /dev/ada0s1a            /               ufs     rw              1       1
    /dev/ada0s1b            none            swap    sw              0       0
    ====================
    New fstab:
    # Device                Mountpoint      FStype  Options         Dump    Pass#
    /dev/ufsid/51f5bc9c854a3254             /               ufs     rw             11
    /dev/label/swap         none            swap    sw              0       0
    [: =: unexpected operator
    Commit changes? (y/n):
    y
    Disabling swap to apply label
    Applying label to swap parition
    Activating new fstab
    Re-enabling swap[/code]
    

    AhnHEL (Angel)

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Jul 29, 2013, 12:17 PM

      That's not fatal (it was in code to auto-commit the changes if you passed in the right command line parameter), but it isn't relevant to using it interactively, so you can proceed from there.

      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
      • W
        w0w
        last edited by Jul 29, 2013, 3:32 PM

        Looks like SMART is also fixed
        https://redmine.pfsense.org/projects/pfsense/repository/revisions/ccf479876283082b39ac9a37c1c6308f4857a6f0/diff

        Thanks jimp!

        1 Reply Last reply Reply Quote 0
        • T
          Tikimotel
          last edited by Jul 30, 2013, 2:19 PM

          For completeness the smart dashboard widget needs the same fix.

          1 Reply Last reply Reply Quote 0
          • W
            w0w
            last edited by Jul 30, 2013, 2:36 PM

            @Tikimotel:

            For completeness the smart dashboard widget needs the same fix.

            Exactly.

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Jul 30, 2013, 3:06 PM

              I just forgot about the widget entirely in the previous commit.

              Done now though:
              https://github.com/pfsense/pfsense/commit/0aa297594cd1882f32d52074ba3546c4f5f97c8e

              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
                gogol
                last edited by Aug 1, 2013, 3:06 PM

                Thanks to your guides I think I have enabled TRIM on my SSD:

                /root(5): tunefs -p /
                tunefs: POSIX.1e ACLs: (-a)                                disabled
                tunefs: NFSv4 ACLs: (-N)                                   disabled
                tunefs: MAC multilabel: (-l)                               disabled
                tunefs: soft updates: (-n)                                 disabled
                tunefs: gjournal: (-J)                                     disabled
                tunefs: trim: (-t)                                         enabled
                tunefs: maximum blocks per file in a cylinder group: (-e)  2048
                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: optimization preference: (-o)                      time
                tunefs: volume label: (-L)                                 
                
                

                and from dmesg

                ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
                ada0: <ts16gssd25s-s v1210=""> ATA-8 SATA 2.x device
                ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 512bytes)
                ada0: Command Queueing enabled
                ada0: 15272MB (31277056 512 byte sectors: 16H 63S/T 16383C)
                lapic1: Forcing LINT1 to edge trigger
                SMP: AP CPU #1 Launched!
                Trying to mount root from ufs:/dev/ufsid/51fa1b22d7786f5c
                WARNING: /: TRIM flag on fs but disk does not support TRIM</ts16gssd25s-s>
                

                Why is there still that last line that my disk doesn't support it?

                I have this one:
                === START OF INFORMATION SECTION ===
                Model Family:    JMicron based SSDs
                Device Model:    TS16GSSD25S-S
                Serial Number:    00246293003C
                Firmware Version: V1210

                According to data sheet it does support trim command.

                1 Reply Last reply Reply Quote 0
                • A
                  a-a-ron
                  last edited by Aug 1, 2013, 3:13 PM

                  It appears you have a similar drive to mine, these drives are older and do not support TRIM.

                  Model Family:    JMicron based SSDs
                  Device Model:    TS32GSSD25S-M

                  1 Reply Last reply Reply Quote 0
                  • G
                    gogol
                    last edited by Aug 1, 2013, 3:27 PM

                    That's weird because on this page:

                    http://www.transcend-info.com/industry/products_details.asp?ModNo=3&Func1No=1

                    Transcend says it does support it. Look at the Features tab and under Specifications SSD25S is named. I have the SLC and you have the MLC.

                    1 Reply Last reply Reply Quote 0
                    • A
                      a-a-ron
                      last edited by Aug 1, 2013, 4:21 PM Aug 1, 2013, 3:43 PM

                      I'll be honest, its been years since i've read or done anything with this drive. Last I read (for mine) it didn't support TRIM, but had "Wear-leveling algorithm ensures reliable data transfer", which I had assumed was pre-TRIM. My drive has been happily sitting in my router doing its job. It wasn't until this thread that I started playing with it again.

                      Mine also doesn't appear to have command queueing either.

                      ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
                      ada0: <ts32gssd25s-m 100415=""> ATA-7 SATA 2.x device
                      ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 512bytes)
                      ada0: 30560MB (62586880 512 byte sectors: 16H 63S/T 16383C)
                      WARNING: /: TRIM flag on fs but disk does not support TRIM</ts32gssd25s-m>
                      

                      I wonder if there is a newer firmware that adds TRIM?

                      EDIT:
                      I don't see in the spec sheets where either drive supports TRIM.
                      TS16GSSD25S-S
                      http://www.csee.umbc.edu/~squire/images/ssd3.pdf
                      http://c.master.lv/p/01/53/40/05/F611373.pdf

                      1 Reply Last reply Reply Quote 0
                      • K
                        kejianshi
                        last edited by Aug 1, 2013, 6:32 PM

                        Jmicron?

                        Be worriedโ€ฆ  Be very worried.

                        If I had a jmicron and just had to run it, I'd do everything possible to minimize writes.

                        Might even treat it like flash card just to be safe.

                        1 Reply Last reply Reply Quote 0
                        • G
                          gogol
                          last edited by Aug 2, 2013, 11:46 AM

                          I did some further investigation and it seems that my Transcend drive (TS16GSSD25S-S) has no TRIM support, although I have found a lot of resources that say otherwise:

                          root: camcontrol identify ada0 | egrep TRIM\|Feature
                          Feature                      Support  Enabled   Value           Vendor
                          data set management (TRIM)     no
                          
                          

                          It is an SLC drive with an MTBF of 1.000.000 hours and wear leveling so I am not worried at all even though it has a JMicron controller. ;)
                          I have it running for about 4 years now as ext3 linux OS server with extensive logging (also not advised by many sources) and now lately for pfSense.
                          http://www.ssdworld.net/?p=tips

                          Ssd's with a JMicron controller however (OCZ and Kingston models) have initially caused much disappointment and frustration.
                          Meanwhile the firmware of ssd's with a JMicron controller have been improved, but because people are very reluctant buying an ssd with a JMicron controller, it will take a while until the appreciation for those ssd's will improve.

                          1 Reply Last reply Reply Quote 0
                          • A
                            andr3wyong
                            last edited by Aug 2, 2013, 1:23 PM

                            @jimp:

                            The AHCI module should be included in snapshots now (I just updated a VM and checked, it's there).

                            Also look at /usr/local/sbin/ufslabels.sh - that would eliminate the need to make any fstab edits.

                            Too late for 2.1 to grow an installer option for it, but perhaps for 2.2.

                            The module is there, but coming from a snapshot before the inclusion of the module, I still require ahci_load="YES" in boot.conf.local - it reverts to the ATA modules otherwise. Is there something Iโ€™m missing?

                            1 Reply Last reply Reply Quote 0
                            • J
                              jimp Rebel Alliance Developer Netgate
                              last edited by Aug 2, 2013, 1:25 PM

                              No, you'll need to load the AHCI module if you want it. That won't change for 2.1.

                              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
                              • A
                                andr3wyong
                                last edited by Aug 2, 2013, 3:18 PM

                                Great, at least itโ€™s behaving as intended, then :)

                                Is there any persistent configuration set by the installer when installing with TRIM enabled though? Or will we have to flip the AHCI switch even if installing with TRIM enabled?

                                1 Reply Last reply Reply Quote 0
                                • J
                                  jimp Rebel Alliance Developer Netgate
                                  last edited by Aug 2, 2013, 3:23 PM

                                  The installer knows nothing of TRIM currently.

                                  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
                                  • S
                                    Sn3ak
                                    last edited by Aug 14, 2013, 8:13 AM

                                    I'd like to point out, the previous patches for the smart status page / widget are incorrect.
                                    This code, at least for me, stops showing ad* devices, and da* devices. It does report ada* devices.

                                    
                                    exec("ls /dev | grep '^[ad][da]a*[0-9]\{1,2\}$'", $devs);
                                    
                                    

                                    Should be: (and this appears to be the latest committed to pfsense)

                                    
                                    exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs);
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      jimp Rebel Alliance Developer Netgate
                                      last edited by Aug 14, 2013, 12:24 PM

                                      The old regex worked fine when I tested it, e.g.

                                      $ cat test.txt 
                                      ad0
                                      da0
                                      ada0
                                      $ grep '^[ad][da]a*[0-9]\{1,2\}$' test.txt 
                                      ad0
                                      da0
                                      ada0
                                      $ ls /dev | grep '^[ad][da]a*[0-9]\{1,2\}$'
                                      ad4
                                      ad6
                                      ada0
                                      ada1
                                      da0
                                      

                                      The newer one is definitely better, but the old one wasn't broken on any system I tried it on.

                                      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
                                        markn62
                                        last edited by Aug 25, 2013, 12:32 AM

                                        This thread got TRIM enabled on an AMD64.  Curious if "time" is the best optimization method or if it's even worth looking into.

                                        [2.1-RC1][admin@pfsense.router]/(2): tunefs -p /
                                        tunefs: POSIX.1e ACLs: (-a)                                disabled
                                        tunefs: NFSv4 ACLs: (-N)                                  disabled
                                        tunefs: MAC multilabel: (-l)                              disabled
                                        tunefs: soft updates: (-n)                                disabled
                                        tunefs: gjournal: (-J)                                    disabled
                                        tunefs: trim: (-t)                                        enabled
                                        tunefs: maximum blocks per file in a cylinder group: (-e)  2048
                                        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: optimization preference: (-o)                      time
                                        tunefs: volume label: (-L)

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