OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • [SOLVED] TRIM support?
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] TRIM support?  (Read 4927 times)

Sundial

  • Newbie
  • *
  • Posts: 19
  • Karma: 3
    • View Profile
[SOLVED] TRIM support?
« on: July 08, 2016, 03:51:41 am »
I've read in several posts here that TRIM should be enabled by default.  I just clean installed 16.7.r1 and TRIM was not enabled by default.  I do have an SSD installed so it should be supported.  I was able to manually enable it in single user mode.
« Last Edit: July 11, 2016, 11:38:20 pm by franco »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13953
  • Karma: 1209
    • View Profile
Re: TRIM support?
« Reply #1 on: July 08, 2016, 08:51:18 am »
It's a tricky endeavour. Some people say TRIM should not be enabled on disks that don't support it/advertise it, but it's all very magical and so we do the following:

Attempt to read the disk's capabilities, enable TRIM if it's advertised.

The part of "attempt to read" will likely fail in your case, so it would be interesting to know why.

The code does the following:

https://github.com/opnsense/core/blob/master/src/etc/rc#L25-L46

Maybe this is due to trying to match a disk as "/\/dev\/([a-z]+[0-9]+)/", it could be that the new installer doing root fs labeling will break this. I'll take a closer look, thanks!
Logged

Sundial

  • Newbie
  • *
  • Posts: 19
  • Karma: 3
    • View Profile
Re: TRIM support?
« Reply #2 on: July 08, 2016, 02:00:35 pm »
Thanks.  It's not a huge deal since I can enable it manually, but the more stuff it does automatically, the better!
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13953
  • Karma: 1209
    • View Profile
Re: TRIM support?
« Reply #3 on: July 08, 2016, 05:55:28 pm »
We'll be able to fix this in 16.7.x too as the enable is done during boot time. I'm filing a ticket, because at this point I don't know how to translate labels from /dev/ufs and /dev/gpt to device names which the camcontrol utility expects.

https://github.com/opnsense/core/issues/1055
Logged

Sundial

  • Newbie
  • *
  • Posts: 19
  • Karma: 3
    • View Profile
Re: TRIM support?
« Reply #4 on: July 09, 2016, 06:03:36 am »
Thanks!  Sounds great.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13953
  • Karma: 1209
    • View Profile
Re: TRIM support?
« Reply #5 on: July 11, 2016, 11:38:08 pm »
Ok, I got this. Fixed in RC2.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • [SOLVED] TRIM support?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2