From owner-freebsd-questions@FreeBSD.ORG Fri Feb 28 06:05:59 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F106BD9 for ; Fri, 28 Feb 2014 06:05:59 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE3F813A7 for ; Fri, 28 Feb 2014 06:05:58 +0000 (UTC) Received: from [88.217.83.68] (helo=localhost.my.domain) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1WJGZv-0000o5-6D; Fri, 28 Feb 2014 07:05:47 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.7/8.14.3) with ESMTP id s1S65idE005313; Fri, 28 Feb 2014 07:05:44 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.7/8.14.3/Submit) id s1S65bL9005312; Fri, 28 Feb 2014 07:05:37 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Fri, 28 Feb 2014 07:05:37 +0100 From: Matthias Apitz To: kpneal@pobox.com Subject: Re: errors from external USB disk Message-ID: <20140228060536.GA5281@La-Habana> References: <20140226121714.GA1532@tiny-r255948> <20140226145527.3cd8eb4b.freebsd@edvax.de> <20140227115934.GA2006@La-Habana> <20140227150715.e6aa0594.freebsd@edvax.de> <20140227175258.GA3214@La-Habana> <20140227183248.GA3339@La-Habana> <20140227191930.GA48451@neutralgood.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140227191930.GA48451@neutralgood.org> X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 88.217.83.68 Cc: Polytropon , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 06:05:59 -0000 El día Thursday, February 27, 2014 a las 02:19:30PM -0500, kpneal@pobox.com escribió: > > The bad block is there; if I restart the reading from 10 blocks before this > > point, it stops at the same block: > > > > # dd if=/dev/da0 of=/dev/null bs=1m skip=712860 > > dd: /dev/da0: Input/output error > > 10+0 records in > > 10+0 records out > > 10485760 bytes transferred in 4.017767 secs (2609848 bytes/sec) > > Bad blocks are supposed to be mapped out when rewritten. > > Having said that, I used to run an external drive through a USB hub. I > ended up with silent, random corruption. I haven't seen any corruption > since I removed the hub, but now I don't trust USB with my data. I have now read the entire disk with dd(1) and the bad area is only in one are, between the are 712870 ... 712874 (based on bs=1m). I rewrote this area with # dd if=/dev/zero of=/dev/da0 bs=1m oseek=712870 count=4 4+0 records in 4+0 records out 4194304 bytes transferred in 0.987089 secs (4249165 bytes/sec) and now the area can be read fine: # dd if=/dev/da0 of=/dev/null bs=1m skip=712869 count=10 10+0 records in 10+0 records out I will now ree-read the entire disk with dd(1) and will overwrite after this entire disk from /dev/zero. Thx matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: www.asciiribbon.org E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards