<div dir="ltr"><div id=":1nv" class="" style="font-size:13px;font-family:arial,sans-serif"><div id=":1nu" style="overflow:hidden"><div dir="ltr">I have a number of 2.5 SATA drives, that I've used for I don't know how long.<div>
<br></div><div>I put one in a <a href="http://startech.com/" target="_blank">startech.com</a> external hard drive encosure model sat2510u2E.</div><div><br></div><div>I wrote a little cron stimulated script to write, and check for file existence, and almost immediately got failures. I was using a USB hub (plugable model:USB1-HUB-AG7) with a 5v 3A wall wart powering the unit under test.</div>
<div><br></div><div>Googling the ehci_hcd failure messages, I find that there are a number of longstanding issues in running these external enclosures under linux kernels, even back in 2007 and earlier.</div><div><br></div>
<div>It's not clear to me yet whether these problems are disk or interface related.</div><div><br></div><div>So I got paranoid, and connected a western digital drive (3TB self contained 3.5in SATA USB interface with wall wart PS) that has been working for me for almost 2 years. No failures in 24 hours.</div>
<div><br></div><div>Then I started learning about S.M.A.R.T., which is a disk self monitoring, reporting, that most modern disk incorporate. Running smartctl, which is part of our OS, on my old disk, and the one which exhibited failures, indicates that the drive itself does not know that it is failing.</div>
<div><br></div><div>I'll probably modify the included script to use smart, in the next iteration. But I thought I'd fish for any expertise within the olpc community.</div><div><br></div><div style>Are any external enclosures known to work? I have't been able to find descriptions of the chipsets that do the USB interface.</div>
<div style><br></div><div style>George</div><div><br></div><div style>Maybe this is too simplistic:</div><div style><br></div><div style><br></div><div><div>#!/bin/bash </div><div># script to check for external hard disk presence and writeability </div>
<div>MOUNTPT=/mnt/usb0</div><div># read a file that is always there</div><div>dtm=`date`</div><div>if [ ! -f "$MOUNTPT/token" ]; then</div><div><span class="" style="white-space:pre"> </span>echo "$dtm failed to read $MOUNTPT/token. Writing it" >>/root/disk.log</div>
<div><span class="" style="white-space:pre"> </span>echo "this is content written at $dtm" >> "$MOUNTPT/token"</div><div>else</div><div><span class="" style="white-space:pre"> </span>echo "$dtm -- success so far" >> /root/disk.log</div>
<div>fi</div><div># check for the absence of a file</div><div>if [ -f "$MOUNTPT/writeit" ]; then</div><div><span class="" style="white-space:pre"> </span>echo "$dtm -- last attempt to remove $MOUNTPT/writeit failed" >> /root/disk.log</div>
<div>else</div><div><span class="" style="white-space:pre"> </span>echo "$dtm -- content of file writeit" >> $MOUNTPT/writeit</div><div>fi</div><div>sync</div><div>if [ -f "$MOUNTPT/writeit" ]; then</div>
<div><span class="" style="white-space:pre"> </span>rm "$MOUNTPT/writeit"</div><div>else</div><div><span class="" style="white-space:pre"> </span>echo "$dtm -- failed to write $MOUNTPT/writeit" >> /root/disk.log</div>
<div>fi</div></div><div><br></div><div class=""></div></div></div></div><div id=":1o5" class="" style="font-size:13px;font-family:arial,sans-serif"></div></div>