From owner-freebsd-stable@FreeBSD.ORG Sun Mar 13 23:52:52 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD56C16A4CE for ; Sun, 13 Mar 2005 23:52:52 +0000 (GMT) Received: from duchess.speedfactory.net (duchess.speedfactory.net [66.23.201.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 1C58A43D53 for ; Sun, 13 Mar 2005 23:52:52 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 19358 invoked by uid 89); 13 Mar 2005 23:52:49 -0000 Received: from duchess.speedfactory.net (66.23.201.84) by duchess.speedfactory.net with SMTP; 13 Mar 2005 23:52:49 -0000 Received: (qmail 18709 invoked by uid 89); 13 Mar 2005 23:52:31 -0000 Received: from unknown (HELO ?66.23.216.52?) (66.23.216.52) by duchess.speedfactory.net with SMTP; 13 Mar 2005 23:52:31 -0000 From: Stephan Uphoff To: Torfinn Ingolfsen In-Reply-To: <20050312215400.08a664a7.torfinn.ingolfsen@broadpark.no> References: <20050312215400.08a664a7.torfinn.ingolfsen@broadpark.no> Content-Type: text/plain Message-Id: <1110757829.29676.273.camel@beach> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 13 Mar 2005 18:50:30 -0500 Content-Transfer-Encoding: 7bit cc: freebsd-stable@freebsd.org Subject: Re: Diagnostic tools for external hard drives? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 23:52:52 -0000 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: 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@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) Example: dd if=/dev/zero of=/dev/da1 bs=512 oseek=79 count=1 Good luck Stephan