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 7963 times)
Sundial
Newbie
Posts: 20
Karma: 3
[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: 17664
Karma: 1611
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: 20
Karma: 3
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: 17664
Karma: 1611
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: 20
Karma: 3
Re: TRIM support?
«
Reply #4 on:
July 09, 2016, 06:03:36 am »
Thanks! Sounds great.
Logged
franco
Administrator
Hero Member
Posts: 17664
Karma: 1611
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?