Diagnostic tools for external hard drives?

Stephan Uphoff ups at tree.com
Sun Mar 13 15:52:52 PST 2005

On Sat, 2005-03-12 at 15:54, Torfinn Ingolfsen wrote:
> Hello,
> Does FreeBSD (stable) have any tools that I can use to run diagnostics
> on an external hard drive?
> I have a Maxtor One Touch 250GB external hard drive (the one with both
> USB and Firewire connectors). This is connected to my FreeBSD 5-stable
> machine with firewire.
> >From /var/log/messages:
> Mar 12 21:29:38 kg-work kernel: da1 at sbp0 bus 0 target 1 lun 0
> Mar 12 21:29:38 kg-work kernel: da1: <Maxtor OneTouch 0000> Fixed Direct
> Access SCSI-4 device 
> Mar 12 21:29:38 kg-work kernel: da1: 50.000MB/s transfers 
> Mar 12 21:29:38 kg-work kernel: da1: 239371MB (490232832 512
> byte sectors: 255H 63S/T 30515C)
> Today the drive suddenly stopped working, and when I try to mount it now
> it says:
> root at kg-work# mount /dev/da1s1e /mnt
> mount: /dev/da1s1e: Input/output error
> In /var/log/messages I see lots of error messages
> (see attached file).
> Maxtor have a (Windows-only) tool that will do diagnostics, but only on
> "One Touch II" drives, not on those who are only "One Touch".
> So any tool I can use under FreeBSD will help. The drive is still under
> warranty, so I will not open it (yet).
> Any hints appreciated.

>Mar 12 21:48:27 kg-work kernel: (da1:sbp0:0:1:0): READ(10). CDB: 28 0 0
0 0 4f 0 0 10 0 

Reading 0x10 = 16 sectors = 8k starting at sector 0x4f = 79

> MEDIUM ERROR asc:4b,0

The asc is a bit strange. However Medium Error can also be used as
"Something is wrong and I don't know what" ;-)

I would try to read sectors using dd.

dd if=/dev/da1 of=/dev/null bs=512 iseek=79 count=1
dd if=/dev/da1 of=/dev/null bs=512 iseek=88 count=1

and some unrelated sectors 

dd if=/dev/da1 of=/dev/null bs=512 iseek=0 count=1

If only a single sector (or a few) can not be read I would try to write
zero to the sectors.This may clear the media error. (The previous data
is obviously lost)

dd if=/dev/zero of=/dev/da1 bs=512 oseek=79 count=1

Good luck

More information about the freebsd-stable mailing list