pfSense Support Subscription

Author Topic: Request to add to documentation wiki how to check and enable TRIM support  (Read 2348 times)

0 Members and 1 Guest are viewing this topic.

Offline openletter

  • Jr. Member
  • **
  • Posts: 73
  • Karma: +2/-0
    • View Profile
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:

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:
Code: [Select]
/sbin/tunefs -t enable /
/sbin/shutdown -r now

After the reboot login and confirm TRIM is enabled:
Code: [Select]
[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:

Code: [Select]
tunefs -p /
pfSense 2.3.3-RELEASE-p1 (amd64) installed to PC on SanDisk Z400s 128 GB SSD with JetWay JATOM-GM1-330-LF, Intel Atom 330, Intel 945GC, 2 GB RAM, 1 mobo 10/100 (WAN), x2 PCI 10/100/1000 NICs (LAN1, LAN2), 1 PCIe 10/100/1000 NIC (LAN3), and APC Smart-UPS 700.

Offline Finger79

  • Full Member
  • ***
  • Posts: 187
  • Karma: +17/-0
    • View Profile
Bumping to second the OP's request.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14397
  • Karma: +1334/-199
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Request to add to documentation wiki how to check and enable TRIM support
« Reply #2 on: November 08, 2016, 09:42:35 am »
"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.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.3.4_p1 (work)
1x SG-4860 2.4.2-RELEASE (home)

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21373
  • Karma: +1431/-26
    • View Profile
Re: Request to add to documentation wiki how to check and enable TRIM support
« Reply #3 on: November 08, 2016, 03:24:28 pm »
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.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline openletter

  • Jr. Member
  • **
  • Posts: 73
  • Karma: +2/-0
    • View Profile
Re: Request to add to documentation wiki how to check and enable TRIM support
« Reply #4 on: November 08, 2016, 03:44:38 pm »
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.3.3-RELEASE-p1 (amd64) installed to PC on SanDisk Z400s 128 GB SSD with JetWay JATOM-GM1-330-LF, Intel Atom 330, Intel 945GC, 2 GB RAM, 1 mobo 10/100 (WAN), x2 PCI 10/100/1000 NICs (LAN1, LAN2), 1 PCIe 10/100/1000 NIC (LAN3), and APC Smart-UPS 700.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21373
  • Karma: +1431/-26
    • View Profile
Re: Request to add to documentation wiki how to check and enable TRIM support
« Reply #5 on: November 08, 2016, 04:13:38 pm »
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.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!