Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: usb connected hard drives and i/o errors.
On Sat, Aug 23, 2008 at 12:07:32PM -0700, Darren Reed wrote:
> I'm not sure if this is purely an i386 issue but I'm dealing with
> it on a pc and I'm not sure it is generic enough for kern...
>
> The problem is a hard drive that I'm trying to recover data from.
>
> It's a laptop form factor sata drive, so once removed from the
> laptop, there are not as many options available... the most obvious
> one being to connect it to a USB<->SATA thingy.
>
> This isn't exactly perfect: it appears that this adapter introduces
> two failure modes:
> - "loud" I/O error (read returns -1)
> - "silent" I/O error (read returns as if it read everything but the
> data buffer is unchanged.)
Ough
>
> To detect the 2nd, I fill the buffer with a known pattern that is
> unlikely to appear on disk and see if the post-read buffer has
> the same pattern...not exactly ideal.
>
> I'm looking for recommendations...
> - are there USB SATA/IDE connectors that don't silently report errors?
I hope so;
> - is there something in NetBSD that is ignoring an error?
I don't think so. The high-level drivers are shared for ATAPI, SCSI and USB.
If error were ignored at this level it would be known, I guess.
If it was at the USB level, I'm not sure why it would do it only in some
cases, or for some devices.
> - is there a "raw" mode to access hard drives connected via USB in
> such a manner that errors are properly seen by the O/S and where
> the adapter doesn't try to "cover up"?
unfortunably not, the enclosure usually don't give access to the SATA
registers.
>
> What really worries me about the silent errors is that I'm sure many
> other USB disk enclosures also do this and that I've no way of knowing.
>
> I'm starting to wonder if USB drives are time bombs and if I should have
> been doing something else...although I'd be similarly suspicious of
> firewire.
Quite possible. They're doing protocol translation, and the error case
is probably not well tested by manufacturers (at last not in all the ways
an (S)ATA drive can fail).
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index