Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Franco57 on September 20, 2020, 03:57:45 PM

Title: Trouble with SSD on SATA at startup
Post by: Franco57 on September 20, 2020, 03:57:45 PM
I have a Olimex Olinuxino A20 micro board with a SSD disk (64GB Transcend) as boot device. There is an app that start on startup , upgrade the system date and manages an hardware machine. every week at the startup compares this error:

[  95.935994] ata1: irq_stat 0x00000040, connection status changed
<3>ata1: SError: { DevExch }
[  95.944627] ata1: SError: { DevExch }
<4>ata1: limiting SATA link speed to 1.5 Gbps
[  95.952402] ata1: limiting SATA link speed to 1.5 Gbps
<6>ata1: hard resetting link
[  95.960171] ata1: hard resetting link
<6>ata1: SATA link down (SStatus 1 SControl 310)
[  98.196955] ata1: SATA link down (SStatus 1 SControl 310)
<6>ata1: EH complete
[  98.204302] ata1: EH complete
<3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
[  98.220906] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
<3>ata1: irq_stat 0x00000040, connection status changed
[  98.233271] ata1: irq_stat 0x00000040, connection status changed
<3>ata1: SError: { DevExch }
[  98.241907] ata1: SError: { DevExch }
<4>ata1: limiting SATA link speed to 1.5 Gbps
[  98.249732] ata1: limiting SATA link speed to 1.5 Gbps
<6>ata1: hard resetting link

i solve the problem every time with fsck of the ssd.
Every day at the end of the day the system is powered off without shut down.
Every day at startup the app upgrade system time but no hwclock. Maybe this is the problem ?
Note: i also change the power supply of the ssd with external power.
Title: Re: Trouble with SSD on SATA at startup
Post by: LubOlimex on September 22, 2020, 09:23:46 AM
In this specific case I think it is bad SATA cable, this is based on few reports like this:

https://bbs.archlinux.org/viewtopic.php?id=129401
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1385165

My advice is to first replace the SATA cable, if possible get one that has latches to make it hard to disconnect involuntarily.

Removing the powering of the system suddenly can lead to such and even worse file system corruption. No matter the storage medium (SSD, SD card, NAND or eMMC). This seems like a typical problem with embedded Linux machines - and there are both software and hardware approaches to reduce the chances of it happening. I highly recommend you checking this old article:

https://www.embeddedarm.com/about/resource/preventing-filesystem-corruption-in-embedded-linux

I also received an e-mail over the support and I will give you more suggestion and ideas over the e-mail.
Title: Re: Trouble with SSD on SATA at startup
Post by: Franco57 on September 22, 2020, 09:59:29 AM
Thank you very much for the prompt reply. Now I will try the proposed solutions.