Re: External hard disk testing for use with IIAB (internet in a Box) on XO based XSCE servers

2013-06-24 Thread John Gilmore
 For important systems, I think a USB hard drive will be a better
 choice than an empty enclosure.
 
 They are also often cheaper than a new empty enclosure and a new hard
 drive.

Indeed, buying a brand-name external USB2/3 hard drive, which is
invariably implemented as a SATA drive in an enclosure, is often
cheaper these days than buying the exact same drive as a SATA drive.
Check prices at http://newegg.com if they sell in your country.

The Internet Archive, with 10+ Petabytes of spinning drives, buys
hundreds of drives at a time, and these days they usually have
hundreds of discarded enclosures and power supplies to recycle to
local hackers. :-/

John
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Server-devel] External hard disk testing for use with IIAB (internet in a Box) on XO based XSCE servers

2013-06-24 Thread John Gilmore
 For important systems, I think a USB hard drive will be a better
 choice than an empty enclosure.
 
 They are also often cheaper than a new empty enclosure and a new hard
 drive.

Indeed, buying a brand-name external USB2/3 hard drive, which is
invariably implemented as a SATA drive in an enclosure, is often
cheaper these days than buying the exact same drive as a SATA drive.
Check prices at http://newegg.com if they sell in your country.

The Internet Archive, with 10+ Petabytes of spinning drives, buys
hundreds of drives at a time, and these days they usually have
hundreds of discarded enclosures and power supplies to recycle to
local hackers. :-/

John
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


External hard disk testing for use with IIAB (internet in a Box) on XO based XSCE servers

2013-06-23 Thread George Hunt
I have a number of 2.5 SATA drives, that I've used for I don't know how
long.

I put one in a startech.com external hard drive encosure model sat2510u2E.

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.

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.

It's not clear to me yet whether these problems are disk or interface
related.

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.

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.

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.

Are any external enclosures known to work? I have't been able to find
descriptions of the chipsets that do the USB interface.

George

Maybe this is too simplistic:


#!/bin/bash
# script to check for external hard disk presence and writeability
MOUNTPT=/mnt/usb0
# read a file that is always there
dtm=`date`
if [ ! -f $MOUNTPT/token ]; then
echo $dtm   failed to read $MOUNTPT/token. Writing it /root/disk.log
echo this is content written at $dtm  $MOUNTPT/token
else
echo $dtm -- success so far  /root/disk.log
fi
# check for the absence of a file
if [ -f $MOUNTPT/writeit ]; then
echo $dtm -- last attempt to remove $MOUNTPT/writeit failed 
/root/disk.log
else
echo $dtm -- content of file writeit  $MOUNTPT/writeit
fi
sync
if [ -f $MOUNTPT/writeit ]; then
rm $MOUNTPT/writeit
else
echo $dtm -- failed to write $MOUNTPT/writeit  /root/disk.log
fi
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: External hard disk testing for use with IIAB (internet in a Box) on XO based XSCE servers

2013-06-23 Thread James Cameron
Empty USB to SATA enclosures have a tiny adapter containing a
controller and firmware.  The firmware must implement the USB storage
protocol on one side, and the SATA protocol on the other.

It is one of those product areas where the barrier to entry is very
low, the margins low, and this can lead to a wide variation in quality.

Yes, I've found they vary in terms of performance, reliability, and
compatibility.

Many of them don't support SMART, so you'd need to query a drive using
smartctl on a system with a native SATA port in order to prove whether
smartctl will work through the adapter.

Relying on other people's reports is a start.

I recently purchased one to re-use a SATA drive, and tested it with
OLPC OS and Open Firmware.  It works fine, but I have not tested
SMART.  Manufacturer: Welland Industrial Co., Ltd.  Model: ME-746E.
Brand: speed master.  USB Vendor/Product: 174C:5106.  USB Vendor
string: ASMedia.  USB Device string: AS2105.

USB hard drive enclosures on the other hand allow the manufacturer to
eliminate an area of doubt; because they choose both the controller
and the hard drive they can assure compatibility, and test at the USB
storage protocol level.

For important systems, I think a USB hard drive will be a better
choice than an empty enclosure.

They are also often cheaper than a new empty enclosure and a new hard
drive.

-- 
James Cameron
http://quozl.linux.org.au/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


[Server-devel] External hard disk testing for use with IIAB (internet in a Box) on XO based XSCE servers

2013-06-23 Thread George Hunt
I have a number of 2.5 SATA drives, that I've used for I don't know how
long.

I put one in a startech.com external hard drive encosure model sat2510u2E.

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.

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.

It's not clear to me yet whether these problems are disk or interface
related.

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.

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.

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.

Are any external enclosures known to work? I have't been able to find
descriptions of the chipsets that do the USB interface.

George

Maybe this is too simplistic:


#!/bin/bash
# script to check for external hard disk presence and writeability
MOUNTPT=/mnt/usb0
# read a file that is always there
dtm=`date`
if [ ! -f $MOUNTPT/token ]; then
echo $dtm   failed to read $MOUNTPT/token. Writing it /root/disk.log
echo this is content written at $dtm  $MOUNTPT/token
else
echo $dtm -- success so far  /root/disk.log
fi
# check for the absence of a file
if [ -f $MOUNTPT/writeit ]; then
echo $dtm -- last attempt to remove $MOUNTPT/writeit failed 
/root/disk.log
else
echo $dtm -- content of file writeit  $MOUNTPT/writeit
fi
sync
if [ -f $MOUNTPT/writeit ]; then
rm $MOUNTPT/writeit
else
echo $dtm -- failed to write $MOUNTPT/writeit  /root/disk.log
fi
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel