SATA Disk Issues

Discussion in 'Troubleshooting' started by feilipu, Nov 16, 2013.

  1. feilipu

    feilipu New Member

    Joined:
    Nov 9, 2013
    Messages:
    9
    Likes Received:
    1
    There are some errors which cause the SATA disk to lock up when booting first. A command is called which is not responded to and that halts boot for about 120 seconds.

    Details here
    http://feilipu.me/2013/11/16/sata-on-udoo/

    Is this being addressed anywhere?
     
  2. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    There were early reports on issues with SATA... They did some things to resolve issues back during the first (or was it second) update. I still periodically have issues with mine not wanting to boot, so I hope they're still working on it.

    The Udoo team has also reported that they are working to update to the Uboot 2013 code base which might help as well..(Since I assume it's an issue with uboot...)
     
  3. feilipu

    feilipu New Member

    Joined:
    Nov 9, 2013
    Messages:
    9
    Likes Received:
    1
    I have dug into this somewhat.
    It is related to the TRIM command set.

    The issue is caused because the swap code in linux recognises a SSD, by the reported hdparm info, and issues these TRIM commands to the SSD drive during the boot process. But, somehow the Vantec enclosure in its translation from eSATA to SATA (possibly via USB3 using the Prolific PL2773) doesn't support the TRIM command.

    So, for example, adding the option "discard" to the ext3 partition causes them to not mount at all.

    The issue is that TRIM cannot be turned off in the linux swap code. There doesn't seem to be a working option for this.

    Simply not using SSD swap, or putting up with the two minute delay on booting, seems to be the only option for now.
     
  4. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Thanks Feilipu

    Your findings I'm sure will be quite useful to others. I suspect most would just be plugging in a bare SATA drive to the board but who knows!
     
  5. feilipu

    feilipu New Member

    Joined:
    Nov 9, 2013
    Messages:
    9
    Likes Received:
    1
    Yes. My suspicions were confirmed.

    I removed the drive from the enclosure and tested it. The errors are not apparent any more, though there are still a few bare wires to be fixed up with my hacked SATA power cable and USB cable.

    This issue is caused because the enclosure transforms eSATA to SATA via USB3.0 using the Prolific PL2773 chip. This device implements the bridge in Bulk-Only Mass Storage, which is not able to pass TRIM commands to the SSD. But the SSD still reports that it can do TRIM to the kernel, so the kernel gets confused when it asks swap space to do a TRIM command during boot. Unfortunately, there is no way to disable this behavior.

    It is actually a good thing that it can't be disabled because it forced me to remove the drive from the enclosure, only to find that it is twice as fast when connected directly. So we're winning both ways... once I get those hot wires tidied up.

    Updated my post with the new performance figures here.
    SATA on UDOO
     
  6. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Good news indeed.

    So, 107 MB/s average read speed (although no mention of the exact settings/scenario of the test), and no write results. It would be useful if you could do some systematic benchmarking if you have the time.
     
  7. andcmp

    andcmp New Member

    Joined:
    May 8, 2013
    Messages:
    161
    Likes Received:
    0
    So basically we worked to patch as much SATA hard drive issues as possible and the problem, at least in some cases, weren't the disks but the adapters?! :lol:

    Glad you it find out!
     

Share This Page