1
20.1 Legacy Series / Re: ahcich0 CAM status: Command timeout after first reboot on 20.1
« on: December 05, 2020, 08:13:18 pm »
I've just been encountering exactly this problem with OPNsense 20.7. Long boot times with ahcich0/CAM timeouts. And I've found the source: The problem lies in the SSD's ability to handle the TRIM command.
I guess most quality SSDs support trim but this is a cheap Chinese SSD so probably doesn't. And during all those timeouts CAM is trying to issue a TRIM command which isn't recognised by the SSD.
You can check this for yourselves by doing this:
1) Boot your machine and select "2 - single-user mode" at the boot options splash screen
2) After booting into single-user mode press return to get a shell prompt. You shouldn't have to enter username/password or you're not in single-user mode.
3) issue the following command:
# tunefs -t disable /dev/gpt/rootfs
(where /dev/gpt/rootfs is the filesystem listed in /etc/fstab)
then
# reboot
4) Enjoy an error-free rapid boot!
Unfortunately the disable setting doesn't stick permanently. After that first multi-user reboot TRIM is reset - you can see TRIM being re-enabled by tunefs during the boot process but this only seems to have effect on the next reboot. So the question is now how to disable TRIM permanently.
Any suggestions?
I guess most quality SSDs support trim but this is a cheap Chinese SSD so probably doesn't. And during all those timeouts CAM is trying to issue a TRIM command which isn't recognised by the SSD.
You can check this for yourselves by doing this:
1) Boot your machine and select "2 - single-user mode" at the boot options splash screen
2) After booting into single-user mode press return to get a shell prompt. You shouldn't have to enter username/password or you're not in single-user mode.
3) issue the following command:
# tunefs -t disable /dev/gpt/rootfs
(where /dev/gpt/rootfs is the filesystem listed in /etc/fstab)
then
# reboot
4) Enjoy an error-free rapid boot!
Unfortunately the disable setting doesn't stick permanently. After that first multi-user reboot TRIM is reset - you can see TRIM being re-enabled by tunefs during the boot process but this only seems to have effect on the next reboot. So the question is now how to disable TRIM permanently.
Any suggestions?