1
21.1 Legacy Series / How to disable TRIM for a SSD permanently ?
« on: March 05, 2021, 03:41:25 pm »
Spec: Mini PC RM02 from HUNSN, Intel Core I5 8365U, 8GB DDR4, 256GB SSD, 6 Intel I211-AT Gigabit Nics
Using macOS i downloaded the latest VGA installer (OPNsense-21.1-OpenSSL-vga-amd64.img.bz2), extracted it, and then used balenaEtcher to write the image to an USB flash drive.
I booted the HUNSN PC via the USB flash drive to the OPNsense live environment and installed OPNsense with no issue.
After rebooting it came up fine and i began configuring OPNsense via the GUI. Everything was going great.
Then after another reboot i got lots of
And from than on i got these message after every boot.
After a research in this forum i found that disabling TRIM for the SSD could be the solution.
I followed the tip to modify /usr/local/etc/rc regarding disabling TRIM via tunefs -t disable /dev/gpt/rootfs.
(where /dev/gpt/rootfs is the filesystem listed in /etc/fstab) then reboot.
That solved the problem for me.
But after updating OPNsense to the current version i had the old /usr/local/etc/rc and TRIM was enabled again.
The camcontrol command shows the following information
It seems the that SSD does not support TRIM but i dont know why TRIM is set to "yes".
Is it possible to disable TRIM for the SSD permanently ?
Any help is appriciated.
Best regards
Jürgen
Using macOS i downloaded the latest VGA installer (OPNsense-21.1-OpenSSL-vga-amd64.img.bz2), extracted it, and then used balenaEtcher to write the image to an USB flash drive.
I booted the HUNSN PC via the USB flash drive to the OPNsense live environment and installed OPNsense with no issue.
After rebooting it came up fine and i began configuring OPNsense via the GUI. Everything was going great.
Then after another reboot i got lots of
Code: [Select]
ahcich0: Timeout on slot ….
ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED …
ada0:ahcich0:0:0:0): CAM status: Command timeout …
ada0:ahcich0:0:0:0): Retrying command …
messages. And from than on i got these message after every boot.
After a research in this forum i found that disabling TRIM for the SSD could be the solution.
I followed the tip to modify /usr/local/etc/rc regarding disabling TRIM via tunefs -t disable /dev/gpt/rootfs.
(where /dev/gpt/rootfs is the filesystem listed in /etc/fstab) then reboot.
That solved the problem for me.
But after updating OPNsense to the current version i had the old /usr/local/etc/rc and TRIM was enabled again.
The camcontrol command shows the following information
Code: [Select]
root@OPNsense:~ # camcontrol devlist
<SATA SSD SBFM01.3> at scbus0 target 0 lun 0 (ada0,pass0)
Code: [Select]
root@OPNsense:~ # camcontrol identify ada0 | grep TRIM
Data Set Management (DSM/TRIM) yes
It seems the that SSD does not support TRIM but i dont know why TRIM is set to "yes".
Is it possible to disable TRIM for the SSD permanently ?
Any help is appriciated.
Best regards
Jürgen